From 8ff326f3be5f5649e02d15958d4973a328139480 Mon Sep 17 00:00:00 2001 From: ankushKun Date: Fri, 21 Jun 2024 10:12:55 +0530 Subject: [PATCH] latest process before running --- next_app/src/pages/codecell.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/next_app/src/pages/codecell.tsx b/next_app/src/pages/codecell.tsx index 48d743b..5670b19 100644 --- a/next_app/src/pages/codecell.tsx +++ b/next_app/src/pages/codecell.tsx @@ -282,7 +282,13 @@ export default function CodeCell() { const url = window.location != window.parent.location ? document.referrer : document.location.href; setRunning(true); console.log("running", code_); - const r = await runLua(code_, aosProcess, [ + const localProcesses = JSON.parse(localStorage.getItem("aosProcess") || "{}"); + if (!localProcesses[appname]) { + console.log("No process found"); + return + } + setAosProcess(localProcesses[appname]); + const r = await runLua(code_, localProcesses[appname], [ { name: "External-App-Name", value: appname }, { name: "External-Url", value: `${btoa(url)}` }, { name: "File-Type", value: "External-Code-Cell" },