Skip to content

Commit

Permalink
chore: optimize get_amount_class_specificity_increased (#9853)
Browse files Browse the repository at this point in the history
* Optimaze

* pnpm format

---------

Co-authored-by: Mike <[email protected]>
  • Loading branch information
Link-the-elf and Mike authored Dec 8, 2023
1 parent acf7310 commit 6a89a8f
Showing 1 changed file with 1 addition and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -193,13 +193,7 @@ export default class Selector {
}

get_amount_class_specificity_increased() {
let count = 0;
for (const block of this.blocks) {
if (block.should_encapsulate) {
count++;
}
}
return count;
return this.blocks.filter((block) => block.should_encapsulate).length;
}
}

Expand Down

1 comment on commit 6a89a8f

@vercel
Copy link

@vercel vercel bot commented on 6a89a8f Dec 8, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

svelte-5-preview – ./sites/svelte-5-preview

svelte-octane.vercel.app
svelte-5-preview-svelte.vercel.app
svelte-5-preview-git-main-svelte.vercel.app
svelte-5-preview.vercel.app

Please sign in to comment.