diff --git a/README.md b/README.md index 49da932..917c85e 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,9 @@ ReconnectingWebSocket ===================== +**** +**Major notice, this is a library developed by Joe Walnes, I have made a small change +to the implementations: see [pull request](https://github.com/joewalnes/reconnecting-websocket/pull/76). I have decided to publish this to npm so that I can use it with yarn. ** +**** A small JavaScript library that decorates the WebSocket API to provide a WebSocket connection that will automatically reconnect if the connection is dropped. diff --git a/package.json b/package.json index d520927..285077c 100644 --- a/package.json +++ b/package.json @@ -11,6 +11,9 @@ "url": "git://github.com/joewalnes/reconnecting-websocket.git" }, "author": "Joe Walnes", + "contributors": [ + { "name" : "Jóhan Davidsen", "email" : "johan.davidsen@fjakkarin.com", "url" : "https://fjakkarin.com" } + ], "license": "MIT", "bugs": { "url": "https://github.com/joewalnes/reconnecting-websocket/issues" diff --git a/reconnecting-websocket.js b/reconnecting-websocket.js index 0cd4332..f70c7bb 100644 --- a/reconnecting-websocket.js +++ b/reconnecting-websocket.js @@ -102,7 +102,7 @@ } })(this, function () { - if (!('WebSocket' in window)) { + if (!global.window || !('WebSocket' in global.window)) { return; }