From bb6d6d81bed41d4be623d2072f013b77f6d75f9e Mon Sep 17 00:00:00 2001 From: dadiorchen Date: Mon, 22 Jan 2024 07:05:19 +0800 Subject: [PATCH] fix: stringify message to post parant --- src/components/App.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/App.js b/src/components/App.js index a0cc6d7d..86948b36 100644 --- a/src/components/App.js +++ b/src/components/App.js @@ -74,7 +74,7 @@ function MapComponent() { log.warn('click tree:', tree); if (window.parent) { log.warn('DEMO:ok message parent'); - window.parent.postMessage(tree, '*'); + window.parent.postMessage(JSON.stringify(tree), '*'); } const wholeTree = await getTreeById(tree.id).catch((err) => log.warn(err));