[CmdSwitches] Fix crashing on invalid preset

This commit is contained in:
Ducko 2022-03-15 15:16:24 +00:00
parent 8965d3a490
commit 030fc2a044

View file

@ -7,7 +7,7 @@ const presets = {
};
const combinePresets = (...keys) => Object.values(keys.reduce((acc, x) => {
for (const cmd of presets[x].split(' ')) {
for (const cmd of (presets[x] || '').split(' ')) {
if (!cmd) continue;
const [ key, value ] = cmd.split('=');