Skip to content

Commit 49fefbb

Browse files
committed
Merge pull request PatrickJS#63 from raszpi/webpack-require-fix
require check added, fixes PatrickJS#62
2 parents 88b6e88 + cff7cc3 commit 49fefbb

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

angular-websocket.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@
346346
}
347347

348348
// CommonJS
349-
if (typeof exports === 'object' && require) {
349+
if (typeof exports === 'object' && typeof require === 'function') {
350350
try {
351351
ws = require('ws');
352352
Socket = (ws.Client || ws.client || ws);

dist/angular-websocket.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@
346346
}
347347

348348
// CommonJS
349-
if (typeof exports === 'object' && require) {
349+
if (typeof exports === 'object' && typeof require === 'function') {
350350
try {
351351
ws = require('ws');
352352
Socket = (ws.Client || ws.client || ws);

0 commit comments

Comments
 (0)