diff options
Diffstat (limited to 'client/components')
-rw-r--r-- | client/components/cards/details.js | 9 | ||||
-rw-r--r-- | client/components/forms/inlinedform.js | 8 |
2 files changed, 7 insertions, 10 deletions
diff --git a/client/components/cards/details.js b/client/components/cards/details.js index 05da2053..7c09ba81 100644 --- a/client/components/cards/details.js +++ b/client/components/cards/details.js @@ -40,11 +40,10 @@ BlazeComponent.extendComponent({ }, events: function() { - // XXX We can't define this event directly in the event map below because we - // miss ES6 object keys interpolation. - var events = {}; - events[CSSEvents.animationend + ' .js-card-details'] = function() { - this.isLoaded.set(true); + var events = { + [CSSEvents.animationend + ' .js-card-details']: function() { + this.isLoaded.set(true); + } }; return [_.extend(events, { diff --git a/client/components/forms/inlinedform.js b/client/components/forms/inlinedform.js index 2988738c..09c75ce1 100644 --- a/client/components/forms/inlinedform.js +++ b/client/components/forms/inlinedform.js @@ -70,12 +70,10 @@ BlazeComponent.extendComponent({ // Close the inlined form when after its submission submit: function() { - var self = this; - // XXX Swith to an arrow function here when we'll have ES6 if (this.currentData().autoclose !== false) { - Tracker.afterFlush(function() { - self.close(); - self.callFirstWith(self, 'resetCache'); + Tracker.afterFlush(() => { + this.close(); + this.callFirstWith(this, 'resetCache'); }); } } |