chore: optimize `get_amount_class_specificity_increased` (#9853)

* Optimaze

* pnpm format

---------

Co-authored-by: Mike <prince-poley@yandex.ru>
pull/9882/head
Mike Tunik 2 years ago committed by GitHub
parent acf73104b5
commit 6a89a8f482
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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;
}
}

Loading…
Cancel
Save