Skip to content

Commit

Permalink
refactor: use includes method
Browse files Browse the repository at this point in the history
  • Loading branch information
zmalatrax committed Jul 25, 2024
1 parent f3ff3af commit 3451cc8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/scripts/run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export const run = (

if (silent) consola.level = LogLevels.silent;

if (ALL_LAYOUTS.findIndex((name) => layout == name) === -1) {
if (!ALL_LAYOUTS.includes(layout)) {
consola.error(
`Layout "${layout}" is not a valid layout.
Use one from {${ALL_LAYOUTS.join(', ')}}`
Expand Down

0 comments on commit 3451cc8

Please sign in to comment.