瀏覽代碼

fix js error that happens when enter is pressed and there is no highlighted option. fixes #1469

Igor Vaynberg 12 年之前
父節點
當前提交
76f9bae39a
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      select2.js

+ 1 - 1
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();
             }
         },