app/assets/js/base/alpine/directives/dropdown.js in coveragebook_components-0.17.0 vs app/assets/js/base/alpine/directives/dropdown.js in coveragebook_components-0.17.1

- old
+ new

@@ -5,11 +5,11 @@ import { setData, getData } from "@helpers/alpine"; export default function (Alpine) { Alpine.directive( "dropdown", - (el, { value, modifiers, expression }, { evaluate, effect }) => { + (el, { value, modifiers, expression }, { evaluate }) => { // Don't run for dropdown sub-elements // like `x-dropdown:trigger` and `x-dropdown:content` if (value) return; const data = getData(el); @@ -19,10 +19,10 @@ let { triggerTarget, contentTarget, anchorTarget, ...config } = directiveConfig; contentTarget = contentTarget || el.querySelector("[x-dropdown\\:content]"); - content = isNode(contentTarget) + const content = isNode(contentTarget) ? contentTarget.firstElementChild : contentTarget; triggerTarget = triggerTarget || el.querySelector("[x-dropdown\\:trigger]") || el; anchorTarget =