Skip to content

Commit

Permalink
fix: only add to window when it exists (#1362)
Browse files Browse the repository at this point in the history
  • Loading branch information
pauldambra authored Aug 19, 2024
1 parent 907dc72 commit 62ab9ae
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/entrypoints/exception-autocapture.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ const posthogErrorWrappingFunctions = {
wrapOnError,
wrapUnhandledRejection,
}
;(window as any).posthogErrorWrappingFunctions = posthogErrorWrappingFunctions

if (window) {
;(window as any).posthogErrorWrappingFunctions = posthogErrorWrappingFunctions
}

export default posthogErrorWrappingFunctions

0 comments on commit 62ab9ae

Please sign in to comment.