diff --git a/app/assets/javascripts/admin/components/site-setting.js.es6 b/app/assets/javascripts/admin/components/site-setting.js.es6 index 15058e87160..09b0dfe19e4 100644 --- a/app/assets/javascripts/admin/components/site-setting.js.es6 +++ b/app/assets/javascripts/admin/components/site-setting.js.es6 @@ -28,12 +28,11 @@ export default Ember.Component.extend(BufferedContent, ScrollTop, { @computed('buffered.value') enabled: { - get() { - const bufferedValue = this.get('buffered.value'); + get(bufferedValue) { if (Ember.isEmpty(bufferedValue)) { return false; } return bufferedValue === 'true'; }, - set(key, value) { + set(value) { this.set('buffered.value', value ? 'true' : 'false'); } }, diff --git a/app/assets/javascripts/discourse/components/desktop-notification-config.js.es6 b/app/assets/javascripts/discourse/components/desktop-notification-config.js.es6 index 1d5f4bd77bd..eb4e893f1f5 100644 --- a/app/assets/javascripts/discourse/components/desktop-notification-config.js.es6 +++ b/app/assets/javascripts/discourse/components/desktop-notification-config.js.es6 @@ -11,10 +11,8 @@ export default Ember.Component.extend({ @computed notificationsDisabled: { - set(key, value) { - if (arguments.length > 1) { - localStorage.setItem('notifications-disabled', value); - } + set(value) { + localStorage.setItem('notifications-disabled', value); return localStorage.getItem('notifications-disabled'); }, get() { diff --git a/app/assets/javascripts/discourse/controllers/topic.js.es6 b/app/assets/javascripts/discourse/controllers/topic.js.es6 index c112f3458c5..23c803e9954 100644 --- a/app/assets/javascripts/discourse/controllers/topic.js.es6 +++ b/app/assets/javascripts/discourse/controllers/topic.js.es6 @@ -68,13 +68,10 @@ export default Ember.Controller.extend(SelectedPostsCount, BufferedContent, { @computed('model.postStream.summary') show_deleted: { - set(key, value) { + set(value) { const postStream = this.get('model.postStream'); if (!postStream) { return; } - - if (arguments.length > 1) { - postStream.set('show_deleted', value); - } + postStream.set('show_deleted', value); return postStream.get('show_deleted') ? true : undefined; }, get() { @@ -84,13 +81,10 @@ export default Ember.Controller.extend(SelectedPostsCount, BufferedContent, { @computed('model.postStream.summary') filter: { - set(key, value) { + set(value) { const postStream = this.get('model.postStream'); if (!postStream) { return; } - - if (arguments.length > 1) { - postStream.set('summary', value === "summary"); - } + postStream.set('summary', value === "summary"); return postStream.get('summary') ? "summary" : undefined; }, get() { @@ -100,13 +94,10 @@ export default Ember.Controller.extend(SelectedPostsCount, BufferedContent, { @computed('model.postStream.streamFilters.username_filters') username_filters: { - set(key, value) { + set(value) { const postStream = this.get('model.postStream'); if (!postStream) { return; } - - if (arguments.length > 1) { - postStream.set('streamFilters.username_filters', value); - } + postStream.set('streamFilters.username_filters', value); return postStream.get('streamFilters.username_filters'); }, get() {