melanke / Watch.JS

watch the changes of any object or attribute
Other
2.14k stars 219 forks source link

In version 1.3.1 got error "Uncaught TypeError: Cannot read property 'undefined' of undefined" #83

Closed gunins closed 6 years ago

gunins commented 9 years ago

since update to version 1.3.1 I got error "Uncaught TypeError: Cannot read property 'undefined' of undefined" in line 691.

        var n, value;
    for(var i in dirtyChecklist) {
        n = dirtyChecklist[i];
        value = n.object[n.prop];
        if (!compareValues(n.orig ,value)) {
            n.orig = clone(value);
            n.callback(value);
        }
    }

n.object[n.prop] is undefined

xwisdom commented 9 years ago

Many thanks for the fix.