Skip to content

Commit 76f9bae

Browse files
committed
fix js error that happens when enter is pressed and there is no highlighted option. fixes select2#1469
1 parent 31117f4 commit 76f9bae

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

select2.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1653,7 +1653,7 @@ the specific language governing permissions and limitations under the Apache Lic
16531653
if (data) {
16541654
this.highlight(index);
16551655
this.onSelect(data, options);
1656-
} else if (options.noFocus) {
1656+
} else if (options && options.noFocus) {
16571657
this.close();
16581658
}
16591659
},

0 commit comments

Comments
 (0)