mirror of
https://github.com/smogon/pokemon-showdown.git
synced 2026-09-12 03:05:36 -05:00
Config: Arrays are not valid for Config.subprocesses (#11532)
Some checks are pending
Node.js CI / build (18.x) (push) Waiting to run
Some checks are pending
Node.js CI / build (18.x) (push) Waiting to run
This commit is contained in:
@@ -97,7 +97,7 @@ function cacheSubProcesses(config: ConfigType) {
|
||||
config.subprocessescache = (Object.fromEntries(
|
||||
processTypes.map(k => [k, value])
|
||||
) as Record<ProcessType, number>);
|
||||
} else if (typeof value === 'object') {
|
||||
} else if (typeof value === 'object' && !Array.isArray(value)) {
|
||||
config.subprocessescache = value;
|
||||
} else {
|
||||
pushError('error' as const, `Invalid \`subprocesses\` specification. Use any of 0, 1, or a plain old object.`);
|
||||
|
||||
Reference in New Issue
Block a user