-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixing Uncaught TypeError: Cannot read property 'autoReconnect' of null (and add deps.edn) #75
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{:deps {org.clojure/clojurescript {:mvn/version "1.10.520"} | ||
org.clojure/clojure {:mvn/version "1.10.0"} | ||
http-kit {:mvn/version "2.3.0"}} | ||
:paths ["src/clj" "src/cljs"]} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,7 +20,7 @@ | |
([auto-reconnect?] | ||
(websocket-connection auto-reconnect? nil)) | ||
([auto-reconnect? next-reconnect-fn] | ||
(goog.net.WebSocket. auto-reconnect? next-reconnect-fn))) | ||
(goog.net.WebSocket. (or auto-reconnect? false) (or next-reconnect-fn false)))) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Seems to me those can be some let-bindings instead, as the code looks a bit weird as proposed. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yep, and maybe
or, to make things clearer, using something like |
||
|
||
(extend-type goog.net.WebSocket | ||
IWebSocket | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great and obviously would work but have you also considered the following?