Skip to content

Commit

Permalink
correct assertion in meta
Browse files Browse the repository at this point in the history
  • Loading branch information
bekzod committed Jul 4, 2017
1 parent 2232478 commit bbc845f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions packages/ember-metal/lib/meta.js
Original file line number Diff line number Diff line change
Expand Up @@ -331,10 +331,11 @@ export class Meta {
let ret = this._chains;
if (ret === undefined) {
if (this.parent) {
ret = this._chains = this.parent.writableChains(create).copy(this.source);
ret = this.parent.writableChains(create).copy(this.source);
} else {
ret = this._chains = create(this.source);
ret = create(this.source);
}
this._chains = ret;
}
return ret;
}
Expand All @@ -344,7 +345,7 @@ export class Meta {
}

writeWatching(subkey, value) {
assert(`Cannot update watchers for \`hello\` on \`${toString(this.source)}\` after it has been destroyed.`, !this.isMetaDestroyed());
assert(`Cannot update watchers for \`${subkey}\` on \`${toString(this.source)}\` after it has been destroyed.`, !this.isMetaDestroyed());
let map = this._getOrCreateOwnMap('_watching');
map[subkey] = value;
}
Expand Down

0 comments on commit bbc845f

Please sign in to comment.