dsh-model-think-level 2.3.3 → 2.3.4
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/lib/client/order-sync.d.ts +2 -0
- package/lib/client.js +5 -5
- package/lib/client.js.map +3 -3
- package/lib/index.js +5 -4
- package/lib/index.js.map +2 -2
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -839,11 +839,12 @@ function commitUiOrderGuarded(patch, at, file = uiOrderFilePath()) {
|
|
|
839
839
|
const current = readUiOrder(file);
|
|
840
840
|
const incoming = savedAtOf(patch);
|
|
841
841
|
const merged = mergeUiOrder(current, patch, at);
|
|
842
|
-
if (incoming !== void 0 && incoming <= current.savedAt
|
|
843
|
-
return { document: current, stale:
|
|
842
|
+
if (incoming !== void 0 && incoming <= current.savedAt) {
|
|
843
|
+
return { document: current, stale: !sameUiOrderContent(merged, current) };
|
|
844
844
|
}
|
|
845
|
-
|
|
846
|
-
|
|
845
|
+
const document = { ...merged, savedAt: Math.max(current.savedAt, merged.savedAt) };
|
|
846
|
+
writeUiOrder(document, file);
|
|
847
|
+
return { document, stale: false };
|
|
847
848
|
}
|
|
848
849
|
|
|
849
850
|
// src/multi-key-listing.ts
|