Skip to content

Commit

Permalink
fix: react cmp runtime error
Browse files Browse the repository at this point in the history
  • Loading branch information
adamdbradley committed Feb 3, 2022
1 parent 3058bbd commit f250faa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/react/snippet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export const Partytown = (props: PartytownProps = {}): any => {
// Added code will set the [type="data-pt-script"] attribute with the "lib" id.
// If this code renders as SSR/Static HTML, then it'll execute and add the attribute
// which will tell the Client JS of the component to NOT add the same script to the head.
const innerHTML = `document.currentScript.dataset.ptScript=lib;` + partytownSnippet(props);
const innerHTML = `document.currentScript.dataset.ptScript="lib";` + partytownSnippet(props);

return <script suppressHydrationWarning dangerouslySetInnerHTML={{ __html: innerHTML }} />;
};

1 comment on commit f250faa

@vercel
Copy link

@vercel vercel bot commented on f250faa Feb 3, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.