From 878e7b56787fd2b5e7897e9fdb05920e7fdd5e14 Mon Sep 17 00:00:00 2001 From: Syaiful Bahri Date: Mon, 7 Dec 2015 14:45:28 +0700 Subject: [PATCH] Fix Select Component jQuery instance isn't iterable, so we cant destructuring it. closes https://github.com/TryGhost/Ghost/issues/6171 --- ghost/admin/app/components/gh-select-native.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ghost/admin/app/components/gh-select-native.js b/ghost/admin/app/components/gh-select-native.js index 0c5d49e958..64e1af11d6 100644 --- a/ghost/admin/app/components/gh-select-native.js +++ b/ghost/admin/app/components/gh-select-native.js @@ -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