diff --git a/src/App.tsx b/src/App.tsx index ccf2166..a40d80d 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -47,14 +47,14 @@ export default function App() { ); const handlePublish = async (data: any, route?: { key: string }) => { - await new Promise((resolve) => setTimeout(resolve, 1000)); - if (typeof window !== "undefined" && window.parent !== window) { - window.parent.postMessage( - { type: "PUBLISH", data: { data, route: route?.key } }, - "*", - ); - } + if (typeof window !== "undefined" && window.parent !== window) { + window.parent.postMessage( + { type: "PUBLISH", data: { data, route: route?.key } }, + "*", + ); } + await new Promise((resolve) => setTimeout(resolve, 1000)); + }; const plugins = useMemo( () => [createTailwindCdnPlugin()],