Skip to content

Commit 3b5d8b1

Browse files
committed
Fix removeObserver deprecations
1 parent 5575387 commit 3b5d8b1

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

addon/components/bs-datetimepicker.js

+16-16
Original file line numberDiff line numberDiff line change
@@ -79,27 +79,27 @@ export default Component.extend(DynamicAttributeBindings, {
7979
}
8080
});
8181

82-
this.addObserver(this, 'date', this.updateDate);
83-
this.addObserver(this, 'disabledDates', this.updateDisabledDates);
84-
this.addObserver(this, 'format', this.updateFormat);
85-
this.addObserver(this, 'locale', this.updateLocale);
86-
this.addObserver(this, 'maxDate', this.updateMaxDate);
87-
this.addObserver(this, 'minDate', this.updateMinDate);
88-
this.addObserver(this, 'timeZone', this.updateTimeZone);
89-
this.addObserver(this, 'viewMode', this.updateViewMode);
82+
this.addObserver('date', this, 'updateDate');
83+
this.addObserver('disabledDates', this, 'updateDisabledDates');
84+
this.addObserver('format', this, 'updateFormat');
85+
this.addObserver('locale', this, 'updateLocale');
86+
this.addObserver('maxDate', this, 'updateMaxDate');
87+
this.addObserver('minDate', this, 'updateMinDate');
88+
this.addObserver('timeZone', this, 'updateTimeZone');
89+
this.addObserver('viewMode', this, 'updateViewMode');
9090
},
9191

9292
willDestroyElement() {
9393
this._super(...arguments);
9494

95-
this.removeObserver(this, 'date', this.updateDate);
96-
this.removeObserver(this, 'disabledDates', this.updateDisabledDates);
97-
this.removeObserver(this, 'format', this.updateFormat);
98-
this.removeObserver(this, 'locale', this.updateLocale);
99-
this.removeObserver(this, 'maxDate', this.updateMaxDate);
100-
this.removeObserver(this, 'minDate', this.updateMinDate);
101-
this.removeObserver(this, 'timeZone', this.updateTimeZone);
102-
this.removeObserver(this, 'viewMode', this.updateViewMode);
95+
this.removeObserver('date', this, 'updateDate');
96+
this.removeObserver('disabledDates', this, 'updateDisabledDates');
97+
this.removeObserver('format', this, 'updateFormat');
98+
this.removeObserver('locale', this, 'updateLocale');
99+
this.removeObserver('maxDate', this, 'updateMaxDate');
100+
this.removeObserver('minDate', this, 'updateMinDate');
101+
this.removeObserver('timeZone', this, 'updateTimeZone');
102+
this.removeObserver('viewMode', this, 'updateViewMode');
103103

104104
// Running the `ember` application embedded might cause the DOM to be cleaned before
105105
let dateTimePicker = this.picker();

0 commit comments

Comments
 (0)