From 94156189929142d2a1271b0a092c8f0ab4d24f14 Mon Sep 17 00:00:00 2001 From: tamaina Date: Mon, 20 Jul 2020 01:07:02 +0900 Subject: [PATCH] fix lint (#6568) --- src/client/scripts/aiscript/api.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/client/scripts/aiscript/api.ts b/src/client/scripts/aiscript/api.ts index 0db02c2a21..9ca16df494 100644 --- a/src/client/scripts/aiscript/api.ts +++ b/src/client/scripts/aiscript/api.ts @@ -44,9 +44,8 @@ export function createAiScriptEnv(vm, opts) { export function createPluginEnv(vm, opts) { const config = new Map(); - for (const key in opts.plugin.config) { - const val = opts.plugin.configData[key] || opts.plugin.config[key].default; - config.set(key, jsToVal(val)); + for (const [k, v] of Object.entries(opts.plugin.config)) { + config.set(k, jsToVal(opts.plugin.configData[k] || v.default)); } return {