Skip to content

Commit 7677433

Browse files
stan-zmarijnh
authored andcommitted
[show-hint addon] Fix select for initially unselected
FIxes #5380
1 parent 1004275 commit 7677433

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

addon/hint/show-hint.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@
333333
i = avoidWrap ? 0 : this.data.list.length - 1;
334334
if (this.selectedHint == i) return;
335335
var node = this.hints.childNodes[this.selectedHint];
336-
node.className = node.className.replace(" " + ACTIVE_HINT_ELEMENT_CLASS, "");
336+
if (node) node.className = node.className.replace(" " + ACTIVE_HINT_ELEMENT_CLASS, "");
337337
node = this.hints.childNodes[this.selectedHint = i];
338338
node.className += " " + ACTIVE_HINT_ELEMENT_CLASS;
339339
if (node.offsetTop < this.hints.scrollTop)

0 commit comments

Comments
 (0)