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 f44d7441bb
commit 878e7b5678

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