Skip to content

Commit

Permalink
fix issues with getting tags on destroyed objects
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Garrett committed Mar 19, 2019
1 parent 81f88df commit 5fcc7e9
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions packages/@ember/-internals/metal/lib/tags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,13 @@ export function tagForProperty(object: any, propertyKey: string | symbol, _meta?
export function tagFor(object: any | null, _meta?: Meta): Tag {
if (typeof object === 'object' && object !== null) {
let meta = _meta === undefined ? metaFor(object) : _meta;
return meta.writableTag(makeTag);
} else {
return CONSTANT_TAG;

if (!meta.isMetaDestroyed()) {
return meta.writableTag(makeTag);
}
}

return CONSTANT_TAG;
}

export let dirty: (tag: Tag) => void;
Expand Down

0 comments on commit 5fcc7e9

Please sign in to comment.