소스 검색

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