Skip to content

Commit 29255d3

Browse files
committed
Fix TypeError when no options provided
`TypeError: Cannot read property 'debug' of undefined`
1 parent 5a883c4 commit 29255d3

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

reconnecting-websocket.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@
109109
/** The maximum time in milliseconds to wait for a connection to succeed before closing and retrying. */
110110
timeoutInterval: 2000
111111
}
112+
if (!options) { options = {}; }
112113

113114
// Overwrite and define settings with options if they exist.
114115
for (var key in settings) {

0 commit comments

Comments
 (0)