From 3451cc856542edb6334c7ec68dd9a6d687fcc61d Mon Sep 17 00:00:00 2001 From: malatrax Date: Thu, 25 Jul 2024 16:24:33 +0200 Subject: [PATCH] refactor: use includes method --- src/scripts/run.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/scripts/run.ts b/src/scripts/run.ts index 056fb53c..3a910bbc 100644 --- a/src/scripts/run.ts +++ b/src/scripts/run.ts @@ -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(', ')}}`