Skip to content

Commit e7c80a5

Browse files
committed
fix(cli): avoid using Array methods on MapIterator in showWarning
1 parent dbca07b commit e7c80a5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/ui/src/cli/utils/create-init-logger.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ export function createInitLogger(config: Config) {
2020
);
2121
},
2222
get showWarning() {
23-
return this.checkedMap.values().find((value) => value) === undefined;
23+
return this.checkedMap.size > 0 &&
24+
!Array.from(this.checkedMap.values()).some(Boolean);
2425
},
2526
/**
2627
* Checks if `<ThemeInit />` component is used in the given file content

0 commit comments

Comments
 (0)