Skip to content

Commit c108094

Browse files
fix web tests
1 parent c3e4709 commit c108094

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/common/src/client/AbstractPowerSyncDatabase.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ import {
3434
} from './sync/stream/AbstractStreamingSyncImplementation.js';
3535
import { IncrementalWatchMode } from './watched/WatchedQueryBuilder.js';
3636
import { WatchedQueryBuilderMap } from './watched/WatchedQueryBuilderMap.js';
37-
import { WatchedQueryComparator } from './watched/processors/comparators.js';
37+
import { FalsyComparator, WatchedQueryComparator } from './watched/processors/comparators.js';
3838

3939
export interface DisconnectAndClearOptions {
4040
/** When set to false, data in local-only tables is preserved. */
@@ -903,10 +903,10 @@ export abstract class AbstractPowerSyncDatabase extends BaseObserver<PowerSyncDB
903903
throw new Error('onResult is required');
904904
}
905905

906-
const { comparator } = options ?? {};
906+
const { comparator = FalsyComparator } = options ?? {};
907907
// This watch method which provides static SQL is currently only compatible with the comparison mode.
908908
// Uses shared incremental watch logic under the hood, but maintains the same external API as the old watch method.
909-
const watchedQuery = this.incrementalWatch({ mode: IncrementalWatchMode.COMPARISON }).build({
909+
const watchedQuery = this.incrementalWatch({ mode: IncrementalWatchMode.COMPARISON }).build<QueryResult | null>({
910910
comparator,
911911
watch: {
912912
query: {

0 commit comments

Comments
 (0)