REFACTOR: removes useless variable assignment (#9666)

REFACTOR: removes useless variable assignment (#9666)

diff --git a/app/assets/javascripts/select-kit/components/select-kit.js b/app/assets/javascripts/select-kit/components/select-kit.js
index 71cf24e..74544c9 100644
--- a/app/assets/javascripts/select-kit/components/select-kit.js
+++ b/app/assets/javascripts/select-kit/components/select-kit.js
@@ -641,19 +641,18 @@ export default Component.extend(
     },
 
     _highlightNext() {
-      const highlightedIndex = this.mainCollection.indexOf(
+      let highlightedIndex = this.mainCollection.indexOf(
         this.selectKit.highlighted
       );
-      let newHighlightedIndex = highlightedIndex;
       const count = this.mainCollection.length;
 
       if (highlightedIndex < count - 1) {
-        newHighlightedIndex = highlightedIndex + 1;
+        highlightedIndex = highlightedIndex + 1;
       } else {
-        newHighlightedIndex = 0;
+        highlightedIndex = 0;
       }
 
-      const highlighted = this.mainCollection.objectAt(newHighlightedIndex);
+      const highlighted = this.mainCollection.objectAt(highlightedIndex);
       if (highlighted) {
         this._scrollToRow(highlighted);
         this.set("selectKit.highlighted", highlighted);
@@ -661,19 +660,18 @@ export default Component.extend(
     },
 
     _highlightPrevious() {
-      const highlightedIndex = this.mainCollection.indexOf(
+      let highlightedIndex = this.mainCollection.indexOf(
         this.selectKit.highlighted
       );
-      let newHighlightedIndex = highlightedIndex;
       const count = this.mainCollection.length;
 
       if (highlightedIndex > 0) {
-        newHighlightedIndex = highlightedIndex - 1;
+        highlightedIndex = highlightedIndex - 1;
       } else {
-        newHighlightedIndex = count - 1;
+        highlightedIndex = count - 1;
       }
 
-      const highlighted = this.mainCollection.objectAt(newHighlightedIndex);
+      const highlighted = this.mainCollection.objectAt(highlightedIndex);
       if (highlighted) {
         this._scrollToRow(highlighted);
         this.set("selectKit.highlighted", highlighted);

GitHub sha: 3cd412ae

This commit appears in #9666 which was approved by eviltrout. It was merged by jjaffeux.