Skip to content

Commit e4a38d5

Browse files
committed
make tests happy
1 parent 6619ee2 commit e4a38d5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

assets/js/phoenix/socket.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,7 @@ export default class Socket {
523523
}
524524

525525
onConnClose(event){
526-
this.conn.onclose = () => {} // noop to prevent recursive calls in teardown
526+
if(this.conn) this.conn.onclose = () => {} // noop to prevent recursive calls in teardown
527527
let closeCode = event && event.code
528528
if(this.hasLogger()) this.log("transport", "close", event)
529529
this.triggerChanError()

0 commit comments

Comments
 (0)