Skip to content

Commit

Permalink
Conditional embed script addition (#619)
Browse files Browse the repository at this point in the history
  • Loading branch information
chavda-bhavik authored Jun 25, 2024
2 parents 4826ae8 + 628706d commit 98afb79
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion apps/web/pages/_document.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,13 @@ export default class _Document extends Document<MyDocumentProps> {
<body>
<Main />
<NextScript />
<Script type="text/javascript" src={publicRuntimeConfig.NEXT_PUBLIC_EMBED_URL} strategy="beforeInteractive" />
{publicRuntimeConfig.NEXT_PUBLIC_EMBED_URL && (
<Script
type="text/javascript"
src={publicRuntimeConfig.NEXT_PUBLIC_EMBED_URL}
strategy="beforeInteractive"
/>
)}
</body>
</Html>
);
Expand Down

0 comments on commit 98afb79

Please sign in to comment.