Skip to content

Commit d30c9c7

Browse files
enspandilukemelia
authored andcommitted
Add additional check for meta.isInitializing to allow defining values at create time since Ember 2.6
1 parent 44d55c8 commit d30c9c7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

addon/mixin.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@ export default Ember.Mixin.create({
5151
setUnknownProperty(key, value) {
5252
const m = meta(this);
5353

54-
if (m.proto === this) {
55-
// if marked as prototype then just defineProperty
56-
// rather than delegate
54+
if (m.proto === this || (m.isInitializing && m.isInitializing())) {
55+
// if marked as prototype or object is initializing then just
56+
// defineProperty rather than delegate
5757
defineProperty(this, key, null, value);
5858
return value;
5959
}

0 commit comments

Comments
 (0)