diff --git a/packages/svelte/src/compiler/phases/2-analyze/css/css-prune.js b/packages/svelte/src/compiler/phases/2-analyze/css/css-prune.js index dec85c0361..583b2c9f2d 100644 --- a/packages/svelte/src/compiler/phases/2-analyze/css/css-prune.js +++ b/packages/svelte/src/compiler/phases/2-analyze/css/css-prune.js @@ -141,16 +141,12 @@ function get_relative_selectors(node) { // nesting could be inside pseudo classes like :is, :has or :where for (let selector of selectors) { - walk( - selector, - {}, - { - // @ts-ignore - NestingSelector() { - has_explicit_nesting_selector = true; - } + walk(selector, null, { + // @ts-ignore + NestingSelector() { + has_explicit_nesting_selector = true; } - ); + }); // if we found one we can break from the others if (has_explicit_nesting_selector) break; } @@ -881,17 +877,17 @@ function get_element_parent(node) { } /** - * @param {Compiler.AST.RegularElement | Compiler.AST.SvelteElement} element + * @param {Compiler.AST.RegularElement | Compiler.AST.SvelteElement} node * @param {boolean} adjacent_only * @returns {Map} */ -function get_possible_element_siblings(element, adjacent_only) { +function get_possible_element_siblings(node, adjacent_only) { /** @type {Map} */ const result = new Map(); - const path = element.metadata.path; + const path = node.metadata.path; /** @type {Compiler.SvelteNode} */ - let current = element; + let current = node; let i = path.length;