mirror of https://github.com/ColorlibHQ/AdminLTE
Dropdown.js: return early (#2783)
parent
312e083fc0
commit
f091c5d510
|
@ -58,7 +58,10 @@ class Dropdown {
|
||||||
fixPosition() {
|
fixPosition() {
|
||||||
const $element = $(Selector.DROPDOWN_MENU_ACTIVE)
|
const $element = $(Selector.DROPDOWN_MENU_ACTIVE)
|
||||||
|
|
||||||
if ($element.length !== 0) {
|
if ($element.length === 0) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
if ($element.hasClass(ClassName.DROPDOWN_RIGHT)) {
|
if ($element.hasClass(ClassName.DROPDOWN_RIGHT)) {
|
||||||
$element.css('left', 'inherit')
|
$element.css('left', 'inherit')
|
||||||
$element.css('right', 0)
|
$element.css('right', 0)
|
||||||
|
@ -79,7 +82,6 @@ class Dropdown {
|
||||||
$element.css('right', 0)
|
$element.css('right', 0)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// Static
|
// Static
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue