Skip to content

Commit cf80d8e

Browse files
author
Tomas Kirda
committed
Use jQuery's trim and inArray so it works in IE8. Fixes devbridge#226
1 parent 3e7fb81 commit cf80d8e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/jquery.autocomplete.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -723,9 +723,10 @@
723723
},
724724

725725
validateOrientation: function(orientation, fallback) {
726-
orientation = orientation.trim().toLowerCase();
727-
if(['auto', 'bottom', 'top'].indexOf(orientation) == '-1')
726+
orientation = $.trim(orientation || '').toLowerCase();
727+
if($.inArray(orientation, ['auto', 'bottom', 'top']) === -1){
728728
orientation = fallback;
729+
}
729730
return orientation
730731
},
731732

0 commit comments

Comments
 (0)