Skip to content

Commit

Permalink
fix: ReferenceError: Cannot access 'global' before initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
satoren committed Jan 17, 2025
1 parent 222d9ab commit 479262c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion assets/js/phoenix/constants.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export const globalSelf = typeof self !== "undefined" ? self : null
export const phxWindow = typeof window !== "undefined" ? window : null
export const global = globalSelf || phxWindow || global
export const global = globalSelf || phxWindow || globalThis
export const DEFAULT_VSN = "2.0.0"
export const SOCKET_STATES = {connecting: 0, open: 1, closing: 2, closed: 3}
export const DEFAULT_TIMEOUT = 10000
Expand Down

0 comments on commit 479262c

Please sign in to comment.