Skip to content

Commit

Permalink
Fix environment detect (crossbario#370)
Browse files Browse the repository at this point in the history
* Fix environment detect

Use browser WebSocket implementation for Electron apps

* Review fix
  • Loading branch information
RBukharov authored and oberstet committed Aug 1, 2018
1 parent 761446b commit cc45dc3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/transport/websocket.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@ Factory.prototype.create = function () {
//
// running in Node.js
//
if (global.process && global.process.versions.node) {
if (global.process && global.process.versions.node
&& !global.process.versions.hasOwnProperty('electron')) {

(function () {

Expand Down

0 comments on commit cc45dc3

Please sign in to comment.