Explorar el Código

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 hace 2 años
padre
commit
26d52d2b13
Se han modificado 1 ficheros con 4 adiciones y 1 borrados
  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}
     }