@jcbuisson/express-x-client 3.1.6 → 3.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/client.mts +2 -1
package/package.json
CHANGED
package/src/client.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import Dexie from "dexie";
|
|
2
2
|
import { from } from 'rxjs';
|
|
3
|
-
import { distinctUntilChanged } from 'rxjs/operators';
|
|
3
|
+
import { distinctUntilChanged, startWith } from 'rxjs/operators';
|
|
4
4
|
import { liveQuery } from "dexie";
|
|
5
5
|
// uuidv7 are monotonically increasing and much improve database performance amid B-tree indexes
|
|
6
6
|
import { v7 as uuidv7 } from 'uuid';
|
|
@@ -304,6 +304,7 @@ export function offlinePlugin(app) {
|
|
|
304
304
|
})
|
|
305
305
|
const predicate = wherePredicate(where)
|
|
306
306
|
return from(liveQuery(() => db.values.filter(value => !value.__deleted__ && predicate(value)).toArray())).pipe(
|
|
307
|
+
startWith(undefined),
|
|
307
308
|
distinctUntilChanged((prev, curr) => {
|
|
308
309
|
// Deep equality check to prevent unnecessary emissions (in particular on database write)
|
|
309
310
|
return JSON.stringify(prev) === JSON.stringify(curr)
|