Skip to content

Commit b1dd324

Browse files
author
Timofey Dergachev
committed
Fix classes property
1 parent 0368f67 commit b1dd324

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

addon/mixin.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ const {
66
mixin,
77
assert,
88
computed,
9+
Object: EmObject,
910
} = Ember;
1011

1112
// Imitation private properties
@@ -88,12 +89,14 @@ export default Mixin.create({
8889
const id = this.elementId;
8990

9091
this.stylesheet.attach(id, componentName);
91-
this.set('classes', this.stylesheet.sheet.classes);
9292

93+
const classes = EmObject.create(this.stylesheet.sheet.classes);
9394
const sheet = this.stylesheet.dynamicSheets[id];
9495
const fields = this.get('jssObservedProps') || [];
9596
const update = () => sheet.update(this.getProperties(fields));
9697

98+
this.set('classes', classes);
99+
97100
update();
98101

99102
fields.forEach((field) => this.addObserver(field, this, update));
@@ -103,5 +106,5 @@ export default Mixin.create({
103106
this._super(...arguments);
104107

105108
this.stylesheet.detach(this.elementId);
106-
}
109+
},
107110
});

0 commit comments

Comments
 (0)