From 76f9bae39a764107bec6522f59e5675d51f8d9a8 Mon Sep 17 00:00:00 2001 From: Igor Vaynberg Date: Thu, 27 Jun 2013 08:15:30 -0700 Subject: [PATCH] fix js error that happens when enter is pressed and there is no highlighted option. fixes #1469 --- select2.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/select2.js b/select2.js index dc60ba15..a0410359 100644 --- a/select2.js +++ b/select2.js @@ -1653,7 +1653,7 @@ the specific language governing permissions and limitations under the Apache Lic if (data) { this.highlight(index); this.onSelect(data, options); - } else if (options.noFocus) { + } else if (options && options.noFocus) { this.close(); } },