diff --git a/reactive.js b/reactive.js index 74d3ccc..a3a8f12 100644 --- a/reactive.js +++ b/reactive.js @@ -65,7 +65,7 @@ function Reactive( } }, triggerSubs: function (data) { - let { prop, path, pathIds, value, oldValue } = data; + let { prop, path, pathIds, value, oldValue, deleted } = data; if (!path) { path = [prop]; @@ -124,6 +124,7 @@ function Reactive( : value, rawValue: value, oldValue, + deleted, pathValues, prefix: this._prefix, }; @@ -152,6 +153,7 @@ function Reactive( : value, rawValue: value, oldValue, + deleted, pathValues, prefix: this._prefix, }); @@ -468,6 +470,7 @@ function Reactive( //POST TRIGGER target.triggerSubs.bind({ target: target, receiver: receiver })({ prop: prop, + deleted: true, }); } return true; diff --git a/test/reactive.test.js b/test/reactive.test.js index 1012e09..b583527 100644 --- a/test/reactive.test.js +++ b/test/reactive.test.js @@ -386,6 +386,7 @@ it("Multiparent reactive feature", function () { parent2.target1 = target1; parent1.subscribe(null, (data) => { + data.pathString == "target1" ? assert.equal(data.deleted, true) : ""; assert.equal(data.base._prefix, parent1._prefix); }); parent2.subscribe(null, (data) => {