native-document 1.0.33 → 1.0.34
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.
|
@@ -265,9 +265,12 @@ var NativeDocument = (function (exports) {
|
|
|
265
265
|
|
|
266
266
|
if($watchers.has($currentValue)) {
|
|
267
267
|
const $currentValueCallbacks = $watchers.get($currentValue);
|
|
268
|
-
if(
|
|
269
|
-
$currentValueCallbacks
|
|
270
|
-
} else {
|
|
268
|
+
if(typeof $currentValueCallbacks === "function") {
|
|
269
|
+
$currentValueCallbacks(true);
|
|
270
|
+
} else if ($currentValueCallbacks.set) {
|
|
271
|
+
$currentValueCallbacks.set(true);
|
|
272
|
+
}
|
|
273
|
+
else {
|
|
271
274
|
$currentValueCallbacks.forEach(callback => {
|
|
272
275
|
callback.set ? callback.set(true) : callback(true);
|
|
273
276
|
});
|
|
@@ -276,7 +279,9 @@ var NativeDocument = (function (exports) {
|
|
|
276
279
|
if($watchers.has($previousValue)) {
|
|
277
280
|
const $previousValueCallbacks = $watchers.get($previousValue);
|
|
278
281
|
if(typeof $previousValueCallbacks === "function") {
|
|
279
|
-
$previousValueCallbacks
|
|
282
|
+
$previousValueCallbacks(false);
|
|
283
|
+
} else if($previousValueCallbacks.set) {
|
|
284
|
+
$previousValueCallbacks.set(false);
|
|
280
285
|
} else {
|
|
281
286
|
$previousValueCallbacks.forEach(callback => {
|
|
282
287
|
callback.set ? callback.set(false) : callback(false);
|