(q: InitialQueryBuilder)
| 304 | // To avoid calling the query function twice, we wrap it to handle null/undefined returns |
| 305 | // The wrapper will be called once by createLiveQueryCollection |
| 306 | const wrappedQuery = (q: InitialQueryBuilder) => { |
| 307 | const result = unwrappedParam(q) |
| 308 | // If the query function returns null/undefined, throw a special error |
| 309 | // that we'll catch to return null collection |
| 310 | if (result === undefined || result === null) { |
| 311 | throw new Error(`__DISABLED_QUERY__`) |
| 312 | } |
| 313 | return result |
| 314 | } |
| 315 | |
| 316 | try { |
| 317 | return createLiveQueryCollection({ |
nothing calls this directly
no outgoing calls
no test coverage detected