From b6b172858b8072297570b10db362d5b0c5e768a4 Mon Sep 17 00:00:00 2001 From: Ondrej Sevcik Date: Tue, 18 Sep 2018 16:16:45 +0200 Subject: [PATCH] Remove observer It's not necessary as the value is updated in didUpdateAttrs hook. Should fix #67 --- addon/components/range-slider.js | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/addon/components/range-slider.js b/addon/components/range-slider.js index b43cfd4..d9ceb76 100644 --- a/addon/components/range-slider.js +++ b/addon/components/range-slider.js @@ -4,7 +4,7 @@ import { A } from '@ember/array'; import Component from '@ember/component'; import { run } from '@ember/runloop'; import { isEmpty } from '@ember/utils'; -import { observer, computed } from '@ember/object'; +import { computed } from '@ember/object'; import Ember from 'ember'; import noUiSlider from 'noUiSlider'; @@ -137,15 +137,6 @@ export default Component.extend({ slider.destroy(); }, - setValue: observer('start', function() { - let { slider } = this; - - if (slider) { - let value = this.get('start'); - slider.set(value); - } - }), - // disabled can't be just `false` - this leads to an attribute of disabled="false" disabledOrUndefined: computed('disabled', function() { if (this.get('disabled')) {