Skip to content

Commit

Permalink
dropdown.js: Avoid calling jQuery('#')
Browse files Browse the repository at this point in the history
Calling jQuery('#') is considered a syntax error in jQuery 3.
This change avoids this issue, similar to the change in arrow.js
introduced in twbs/bootstrap#20019.
  • Loading branch information
n0nick committed Dec 14, 2016
1 parent 5d6b2eb commit 90331b2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion assets/javascripts/bootstrap/dropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
selector = selector && /#[A-Za-z]/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
}

var $parent = selector && $(selector)
var $parent = $(selector === '#' ? [] : selector)

return $parent && $parent.length ? $parent : $this.parent()
}
Expand Down

0 comments on commit 90331b2

Please sign in to comment.