Skip to content

Commit

Permalink
Remove observer
Browse files Browse the repository at this point in the history
It's not necessary as the value is
updated in didUpdateAttrs hook.

Should fix kennethkalmer#67
  • Loading branch information
ondrejsevcik authored and scottkidder committed Mar 27, 2019
1 parent 3c990b8 commit eb16796
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions addon/components/range-slider.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down Expand Up @@ -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')) {
Expand Down

0 comments on commit eb16796

Please sign in to comment.