Skip to content

Commit

Permalink
Change window debug to conditional (#250)
Browse files Browse the repository at this point in the history
* Check if window exists (nextjs impl)

* changed to guard clause
  • Loading branch information
roneng-wix authored Feb 7, 2024
1 parent 161a013 commit e282fbd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/repluggableAppDebug/repluggableAppDebug.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,10 @@ export function setupDebugInfo({
performance: getPerformanceDebug(options, trace, memoizedArr)
}

if (typeof window === 'undefined') {
return
}

window.repluggableAppDebug = {
host,
uniqueShellNames,
Expand Down

0 comments on commit e282fbd

Please sign in to comment.