[CmdSwitches] Add undefined cmd check

This commit is contained in:
Ducko 2022-04-22 17:47:47 +01:00
parent f0f2d08f2c
commit 6ae3c0f284
1 changed files with 1 additions and 0 deletions

View File

@ -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);