Skip to content

Commit

Permalink
fix: tests in node 10 env (#110)
Browse files Browse the repository at this point in the history
  • Loading branch information
sergey-kozel authored Apr 13, 2023
1 parent ea29941 commit 8dd4844
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,9 @@ function calculateComponentStyleCount(component: ControlMappingType): number {

const variantsCombinations = getCombinations(Object.entries(component.meta.variantGroups));
const statesCombinations = Object.entries(component.meta.states).map(x => x[0]);
statesCombinations.push(...states.flatMap(
(v, i) => states.slice(i + 1).map(w => v + '.' + w)));
statesCombinations.push(...statesCombinations.reduce((acc, v, i) =>
acc.concat(statesCombinations.slice(i + 1).map( w => v + '.' + w )),
[]));

let result: string[] = [];
if (!hasDefaultState) {
Expand Down

0 comments on commit 8dd4844

Please sign in to comment.