浏览代码

testing theorie: subcommands are allways 1 entry

IgnatzHome 7 年之前
父节点
当前提交
6d9ac3ae48
共有 1 个文件被更改,包括 5 次插入1 次删除
  1. 5 1
      client/lib/filter.js

+ 5 - 1
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));