From 6ae3c0f284768346bee76fbac3e9609128994fee Mon Sep 17 00:00:00 2001 From: Oj Date: Fri, 22 Apr 2022 17:47:47 +0100 Subject: [PATCH] [CmdSwitches] Add undefined cmd check --- src/cmdSwitches.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/cmdSwitches.js b/src/cmdSwitches.js index 8986607..b4c458b 100644 --- a/src/cmdSwitches.js +++ b/src/cmdSwitches.js @@ -10,6 +10,7 @@ const presets = { module.exports = () => { let c = {}; for (const x of ('base,' + (oaConfig.cmdPreset || 'perf')).split(',').reduce((a, x) => a.concat(presets[x]?.split(' ')), [])) { + if (!x) continue; const [ k, v ] = x.split('='); (c[k] = c[k] || []).push(v);