Skip to content

Commit d1672ab

Browse files
committed
pid sync fix
1 parent 018ad67 commit d1672ab

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/components/codecell.tsx

+4-1
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,13 @@ export default function CodeCell({ cellId, appName, code = "print('Hello AO!')",
3939
useEffect(() => {
4040
const callback = async (e: any) => {
4141
if (e.data.action == "set_process" && e.data.appname == appName) {
42+
console.log('set_process', appName, e.data.process)
43+
const ids = JSON.parse(sessionStorage.getItem("cell-ids") || "{}");
44+
if(ids[appName]) return;
45+
4246
if (!e.data.process) return;
4347
onAOProcess(e.data.process);
4448
// setMyAoId(e.data.process)
45-
const ids = JSON.parse(sessionStorage.getItem("cell-ids") || "{}");
4649
ids[appName] = e.data.process;
4750
sessionStorage.setItem("cell-ids", JSON.stringify(ids));
4851
} else if (e.data.action == "inbox") {

0 commit comments

Comments
 (0)