From 6d9ac3ae488d66c4f2ce116f0861ad59faa49de2 Mon Sep 17 00:00:00 2001 From: IgnatzHome Date: Sun, 20 May 2018 13:19:18 +0200 Subject: testing theorie: subcommands are allways 1 entry --- client/lib/filter.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'client/lib') diff --git a/client/lib/filter.js b/client/lib/filter.js index 60c2bc84..73a0da99 100644 --- a/client/lib/filter.js +++ b/client/lib/filter.js @@ -205,7 +205,11 @@ class AdvancedFilter { if (start !== -1) { this._processSubCommands(subcommands); - commands.splice(start, 0, subcommands); + console.log ('subcommands: ', subcommands.length); + if (subcommands.length === 1) + commands.splice(start, 0, subcommands[0]); + else + commands.splice(start, 0, subcommands); } this._processConditions(commands); console.log('Conditions: ', JSON.stringify(commands)); -- cgit v1.2.3-1-g7c22