From 6a5e1d503387847bf6cb4841fe49002958da9785 Mon Sep 17 00:00:00 2001 From: jamesgeorge007 Date: Wed, 18 Dec 2019 08:31:58 +0530 Subject: [PATCH] refactor: use Array.includes --- src/compiler/compile/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/compile/index.ts b/src/compiler/compile/index.ts index ac52f59471c8..5d29f71e35cd 100644 --- a/src/compiler/compile/index.ts +++ b/src/compiler/compile/index.ts @@ -33,7 +33,7 @@ function validate_options(options: CompileOptions, warnings: Warning[]) { const { name, filename, loopGuardTimeout, dev } = options; Object.keys(options).forEach(key => { - if (valid_options.indexOf(key) === -1) { + if (!valid_options.includes(key)) { const match = fuzzymatch(key, valid_options); let message = `Unrecognized option '${key}'`; if (match) message += ` (did you mean '${match}'?)`;