automat / controlkit.js

A lightweight controller and gui library
823 stars 82 forks source link

Slider unable to be released when changing value. #17

Closed silentiumsi closed 8 years ago

silentiumsi commented 8 years ago

Select.js:134 Uncaught TypeError: Cannot read property 'toString' of undefined - Select.js:134

Caused by toString conversion in Select.js. Removing .toString() seems to fix the issue. Will confirm nothing else breaks with the change and PR.

silentiumsi commented 8 years ago

This was caused by human error that I somehow missed.

let params = {
  selectOptions: ['one', 'two', 'three'],
  selectSelected: this.selectOptions[0]
}

Of course, this doesn't refer to anything within the object literal. Fixed by settings selectSelected to undefined by default and updating as usual within the onChange method.

readme.md PR incoming.