Skip to content

Commit

Permalink
Fix unbalanced chaining
Browse files Browse the repository at this point in the history
When mutating the chains (`remove()` here) we must call `writableChains()`
to "fork" it from the parent.
  • Loading branch information
chancancode committed Dec 14, 2017
1 parent 8107e85 commit ac10de2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/ember-metal/lib/watch_path.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export function unwatchPath(obj, keyPath, meta) {

if (counter === 1) {
m.writeWatching(keyPath, 0);
m.readableChains().remove(keyPath);
m.writableChains(makeChainNode).remove(keyPath);
} else if (counter > 1) {
m.writeWatching(keyPath, counter - 1);
}
Expand Down

0 comments on commit ac10de2

Please sign in to comment.