Skip to content

Commit

Permalink
chore: optimize get_amount_class_specificity_increased (sveltejs#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

0 comments on commit 6a89a8f

Please sign in to comment.