Ghost/core/client/mixins/nprogress-save.js
Jason Williams 0f17378b26 Enable JSCS checking on client.
Refs #4001
- grunt-jscs@0.8.1 which provides ES6 support.
2014-10-25 16:13:04 +00:00

22 lines
495 B
JavaScript

var NProgressSaveMixin = Ember.Mixin.create({
save: function (options) {
if (options && options.disableNProgress) {
return this._super(options);
}
NProgress.start();
return this._super(options).then(function (value) {
NProgress.done();
return value;
}).catch(function (error) {
NProgress.done();
return Ember.RSVP.reject(error);
});
}
});
export default NProgressSaveMixin;