Skip to content

Commit

Permalink
Merge pull request #1746 from Greenstand/fix-emit
Browse files Browse the repository at this point in the history
Stringify message for posting to parent
  • Loading branch information
dadiorchen committed Jan 21, 2024
2 parents 6f26664 + bb6d6d8 commit 5582ac5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit 5582ac5

Please sign in to comment.