From 621eefc36ec62bb0e2d92ed21a9653b2cd7359b5 Mon Sep 17 00:00:00 2001 From: Garrett Michael Flynn Date: Tue, 12 Mar 2024 14:20:48 -0700 Subject: [PATCH] Parse entries into JS with eval (over JSON) --- src/renderer/src/stories/BasicTable.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/renderer/src/stories/BasicTable.js b/src/renderer/src/stories/BasicTable.js index ef213b7cc..39128438c 100644 --- a/src/renderer/src/stories/BasicTable.js +++ b/src/renderer/src/stories/BasicTable.js @@ -373,7 +373,7 @@ export class BasicTable extends LitElement { let data = text.split("\n").map((row) => row.split("\t").map((v) => { try { - return JSON.parse(v); + return eval(v) } catch { return v.trim(); } @@ -389,8 +389,6 @@ export class BasicTable extends LitElement { }, {}) ); - console.log("Got", structuredData); - Object.keys(this.data).forEach((row) => delete this.data[row]); // Delete all previous rows Object.keys(data).forEach((row) => { const cols = structuredData[row];