Skip to content

Commit

Permalink
fix getComputedStyle detection
Browse files Browse the repository at this point in the history
  • Loading branch information
caseyjhol committed May 29, 2015
1 parent 26fe92c commit 7b1bc31
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion js/bootstrap-select.js
Original file line number Diff line number Diff line change
Expand Up @@ -720,7 +720,7 @@
doneButtonHeight = doneButton ? doneButton.offsetHeight : 0,
dividerHeight = $(divider).outerHeight(true),
// fall back to jQuery if getComputedStyle is not supported
menuStyle = getComputedStyle ? getComputedStyle(menu) : false,
menuStyle = typeof getComputedStyle === 'function' ? getComputedStyle(menu) : false,
$menu = menuStyle ? null : $(menu),
menuPadding = parseInt(menuStyle ? menuStyle.paddingTop : $menu.css('paddingTop')) +
parseInt(menuStyle ? menuStyle.paddingBottom : $menu.css('paddingBottom')) +
Expand Down

0 comments on commit 7b1bc31

Please sign in to comment.