Skip to content

Commit

Permalink
socket.js check if global is available (#5829)
Browse files Browse the repository at this point in the history
Fixes #5825.
  • Loading branch information
SteffenDE authored Jun 13, 2024
1 parent bab16f4 commit d8f7144
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion assets/js/phoenix/socket.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ export default class Socket {
this.primaryPassedHealthCheck = false
this.longPollFallbackMs = opts.longPollFallbackMs
this.fallbackTimer = null
this.sessionStore = opts.sessionStorage || global.sessionStorage
this.sessionStore = opts.sessionStorage || (global && global.sessionStorage)
this.establishedConnections = 0
this.defaultEncoder = Serializer.encode.bind(Serializer)
this.defaultDecoder = Serializer.decode.bind(Serializer)
Expand Down

0 comments on commit d8f7144

Please sign in to comment.