Files
klz-cables.com/.pnpm-store/v10/files/f2/97dc755222292fa94f71d823657d2d9ea0c5ea9258e0791d1aa0a496961a5c2c70ba7d3a1600d89c5d9d168fa8acdbe463548789ed95fe6dbb5369d0d2dc76
Marc Mintel 5397309103
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
fix(products): fix breadcrumbs and product filtering (backport from main)
2026-02-24 16:04:21 +01:00

23 lines
847 B
Plaintext

function resolveElements(elementOrSelector, scope, selectorCache) {
var _a;
if (elementOrSelector instanceof Element) {
return [elementOrSelector];
}
else if (typeof elementOrSelector === "string") {
let root = document;
if (scope) {
// TODO: Refactor to utils package
// invariant(
// Boolean(scope.current),
// "Scope provided, but no element detected."
// )
root = scope.current;
}
const elements = (_a = selectorCache === null || selectorCache === void 0 ? void 0 : selectorCache[elementOrSelector]) !== null && _a !== void 0 ? _a : root.querySelectorAll(elementOrSelector);
return elements ? Array.from(elements) : [];
}
return Array.from(elementOrSelector);
}
export { resolveElements };