melanke-watchjs
Advanced tools
Comparing version 1.4.2 to 1.4.3
{ | ||
"name": "melanke-watchjs", | ||
"version": "1.4.2", | ||
"version": "1.4.3", | ||
"description": "A utility for watching object changes.", | ||
@@ -5,0 +5,0 @@ "main": "src/watch.js", |
@@ -572,8 +572,8 @@ /** | ||
if (prop) { | ||
if (obj.watchers[prop]) { | ||
if (watcher===undefined) { | ||
if (obj.watchers && obj.watchers[prop]) { | ||
if (watcher === undefined) { | ||
delete obj.watchers[prop]; // remove all property watchers | ||
} | ||
else { | ||
for (var i=0; i<obj.watchers[prop].length; i++) { | ||
for (var i = 0; i < obj.watchers[prop].length; i++) { | ||
var w = obj.watchers[prop][i]; | ||
@@ -586,7 +586,6 @@ if (w == watcher) { | ||
} | ||
} | ||
else | ||
{ | ||
} else { | ||
delete obj.watchers; | ||
} | ||
removeFromLengthSubjects(obj, prop, watcher); | ||
@@ -593,0 +592,0 @@ removeFromDirtyChecklist(obj, prop); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
243241
4265