fixed import error on edges

This commit is contained in:
anovazzi1 2023-08-21 16:08:12 -03:00
commit 43ef297263

View file

@ -335,7 +335,7 @@ export function scapedJSONStringfy(json: object): string {
return customStringify(json).replace(/"/g, '\\"'); return customStringify(json).replace(/"/g, '\\"');
} }
export function scapeJSONParse(json: string): any { export function scapeJSONParse(json: string): any {
console.log(json); console.log(json, json.replace(/\\"/g, '"'));
return JSON.parse(json.replace(/\\"/g, '"')); return JSON.parse(json.replace(/\\"/g, '"'));
} }
@ -350,10 +350,10 @@ export function checkOldEdgesHandles(edges: Edge[]): boolean {
); );
} }
function customStringify(obj: any) { function customStringify(obj: any): string {
console.log(obj); console.log(obj);
if (typeof obj === "undefined") { if (typeof obj === "undefined") {
return "undefined"; return '"undefined"';
} }
if (obj === null || typeof obj !== "object") { if (obj === null || typeof obj !== "object") {