Skip to content

Commit

Permalink
Merge pull request #15982 from emberjs/fix-chains
Browse files Browse the repository at this point in the history
Fix issue with unchaining ChainNodes (again)
  • Loading branch information
chancancode authored Dec 14, 2017
2 parents db46888 + ac10de2 commit c376494
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
3 changes: 0 additions & 3 deletions packages/ember-metal/lib/chains.js
Original file line number Diff line number Diff line change
Expand Up @@ -209,11 +209,8 @@ class ChainNode {
remove(path) {
let paths = this._paths;
if (paths === undefined) { return; }

if (paths[path] > 0) {
paths[path]--;
} else {
return;
}

let key = firstKey(path);
Expand Down
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 c376494

Please sign in to comment.