diff --git a/lib/web/mage/dropdowns.js b/lib/web/mage/dropdowns.js index 6c1389924a24b..1496a1c65d957 100644 --- a/lib/web/mage/dropdowns.js +++ b/lib/web/mage/dropdowns.js @@ -127,11 +127,9 @@ define([ } elem.on('click.toggleDropdown', function () { - var el; + var el = actionElem; if (options.autoclose === true) { - el = actionElem; - actionElem = $(); $(document).trigger('click.hideDropdown'); actionElem = el;