Update ember core

no issue

- remove usages of function prototype extensions
- fix usage of evented.off
This commit is contained in:
Renovate Bot 2019-07-22 12:16:00 +00:00 committed by Kevin Ansfield
parent 25a0fcd217
commit c9537e27f1
5 changed files with 622 additions and 115 deletions

View File

@ -79,13 +79,15 @@ export default Component.extend({
this.accept = this.accept || DEFAULTS.accept;
this.extensions = this.extensions || DEFAULTS.extensions;
this._uploadEventHandler = function (file) {
if (file) {
this.set('file', file);
}
this.send('upload');
};
if (listenTo) {
this.eventBus.subscribe(`${listenTo}:upload`, this, function (file) {
if (file) {
this.set('file', file);
}
this.send('upload');
});
this.eventBus.subscribe(`${listenTo}:upload`, this, this._uploadEventHandler);
}
},
@ -104,7 +106,7 @@ export default Component.extend({
this._super(...arguments);
if (listenTo) {
this.eventBus.unsubscribe(`${listenTo}:upload`);
this.eventBus.unsubscribe(`${listenTo}:upload`, this, this._uploadEventHandler);
}
},

View File

@ -41,7 +41,6 @@ export default Mixin.create({
// eslint-disable-next-line ghost/ember/no-observers
hasErrorObserver: on('init', observer('errors.[]', 'property', 'hasValidated.[]', function () {
run.once(this, 'setHasError');
// this.setHasError();
}))
});

View File

@ -49,7 +49,7 @@
"ember-ajax": "5.0.0",
"ember-assign-helper": "0.2.0",
"ember-auto-import": "1.5.2",
"ember-cli": "3.10.1",
"ember-cli": "3.11.0",
"ember-cli-app-version": "3.2.0",
"ember-cli-babel": "7.8.0",
"ember-cli-chai": "0.5.0",
@ -70,7 +70,7 @@
"ember-cli-uglify": "3.0.0",
"ember-composable-helpers": "2.3.1",
"ember-concurrency": "1.0.0",
"ember-data": "3.10.0",
"ember-data": "3.11.2",
"ember-drag-drop": "0.4.8",
"ember-exam": "4.0.0",
"ember-export-application-global": "2.0.0",
@ -89,7 +89,7 @@
"ember-route-action-helper": "2.0.7",
"ember-simple-auth": "1.9.2",
"ember-sinon": "4.0.0",
"ember-source": "3.10.2",
"ember-source": "3.11.1",
"ember-sticky-element": "0.2.3",
"ember-svg-jar": "1.2.2",
"ember-test-selectors": "2.1.0",

View File

@ -10,11 +10,11 @@ describe('Unit: Service: event-bus', function () {
let service = this.owner.lookup('service:event-bus');
let eventHandler = sinon.spy();
service.subscribe('test-event', eventHandler);
service.subscribe('test-event', this, eventHandler);
service.publish('test-event', 'test');
service.unsubscribe('test-event', eventHandler);
service.unsubscribe('test-event', this, eventHandler);
service.publish('test-event', 'test two');

File diff suppressed because it is too large Load Diff