瀏覽代碼

Update 'src/app/core/models/application/actions/action-manager.js'

Fixed error in "app/core/models/application/actions/action-manager.js!push(action)" during intersection creation due JSON.stringfy
 Source of above error, in "push(action)"
 * push(action): changed "console.log("action-manager.js!push(action): action=" + JSON.stringify(action));" by
   var aux = "action(id,type,definition,label,genericObject)=" + (action && action!=undefined ? ...: "<empty>"); console.log("action-manager.js!push(action): " + aux);
leo 2 年之前
父節點
當前提交
26d52d2b13
共有 1 個文件被更改,包括 4 次插入1 次删除
  1. 4 1
      src/app/core/models/application/actions/action-manager.js

+ 4 - 1
src/app/core/models/application/actions/action-manager.js

@@ -23,7 +23,10 @@ export class ActionManager {
     }
 
   push (action) {
-    console.log("action-manager.js!push(action): action=" + JSON.stringify(action));
+    // "TypeError: cyclic object value" : console.log("action-manager.js!push(action): action=" + JSON.stringify(action));
+    var aux = "action(id,type,definition,label,genericObject)=" + (action && action!=undefined ? 
+      "(" + action.id + "," + action.type + ",'" + action.definition + "','" + action.label + "'," + action.genericObject + ")" : "<empty>");
+    console.log("action-manager.js!push(action): " + aux);
     this.actions.push(action); // "action" is JSON like: {"id":2,"type":0,"definition":... ,"elementClass":0}
     }