Skip to content

Commit

Permalink
latest process before running
Browse files Browse the repository at this point in the history
  • Loading branch information
ankushKun committed Jun 21, 2024
1 parent c9416ee commit 8ff326f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion next_app/src/pages/codecell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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" },
Expand Down

0 comments on commit 8ff326f

Please sign in to comment.