Explorar o código

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

Igor Vaynberg %!s(int64=12) %!d(string=hai) anos
pai
achega
76f9bae39a
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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();
             }
         },