We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5f3d16b commit 4a11420Copy full SHA for 4a11420
dist/angular-websocket.js
@@ -33,7 +33,7 @@
33
34
var Socket;
35
36
- if ((typeof exports === 'undefined' ? 'undefined' : _typeof(exports)) === 'object' && typeof require === 'function') {
+ if (typeof window === 'undefined') {
37
try {
38
39
Socket = ws.Client || ws.client || ws;
@@ -412,4 +412,4 @@
412
413
exports.default = _angular2.default.module('ngWebSocket');
414
module.exports = exports['default'];
415
-});
+});
src/angular-websocket.js
@@ -2,7 +2,7 @@ import angular from 'angular';
2
3
4
5
-if (typeof exports === 'object' && typeof require === 'function') {
+if (typeof window === 'undefined') {
6
7
var ws = require('ws');
8
0 commit comments