0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-20 22:42:53 -05:00

Fix Select Component

jQuery instance isn't iterable, so we cant destructuring it.

closes https://github.com/TryGhost/Ghost/issues/6171
This commit is contained in:
Syaiful Bahri 2015-12-07 14:45:28 +07:00
parent 22e3c54ed1
commit b5a8ac3a7d

View file

@ -21,7 +21,9 @@ export default Component.extend({
actions: {
change() {
let [selectEl] = this.$('select');
// jscs:disable requireArrayDestructuring
let selectEl = this.$('select')[0];
// jscs:enable requireArrayDestructuring
let {selectedIndex} = selectEl;
// decrement index by 1 if we have a prompt