|
@@ -92,7 +92,7 @@ class ObservableJSON extends ObservableMap<JSONValue> {
|
|
|
*/
|
|
|
constructor(options: ObservableJSON.IOptions = {}) {
|
|
|
super({
|
|
|
- itemCmp: JSONExt.deepEqual,
|
|
|
+ itemCmp: Private.itemCmp,
|
|
|
values: options.values
|
|
|
});
|
|
|
}
|
|
@@ -448,4 +448,15 @@ namespace Private {
|
|
|
h.div({ className: HOST_CLASS }))
|
|
|
);
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * Compare two objects for JSON equality.
|
|
|
+ */
|
|
|
+ export
|
|
|
+ function itemCmp(a: JSONValue, b: JSONValue): boolean {
|
|
|
+ if (a === void 0 || b === void 0) {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ return JSONExt.deepEqual(a, b);
|
|
|
+ }
|
|
|
}
|