This commit is contained in:
tamaina 2020-07-20 01:07:02 +09:00 committed by GitHub
parent 1c200c9b94
commit 9415618992
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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 {