Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 4a11420

Browse files
HeadPatrickJS
authored andcommitted
fix problem when using webpack (#83)
* fix problem when using webpack Fixed issue #82 * Update angular-websocket.js
1 parent 5f3d16b commit 4a11420

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

‎dist/angular-websocket.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333

3434
var Socket;
3535

36-
if ((typeof exports === 'undefined' ? 'undefined' : _typeof(exports))==='object'&&typeofrequire==='function') {
36+
if (typeof window === 'undefined') {
3737
try {
3838

3939
Socket = ws.Client || ws.client || ws;
@@ -412,4 +412,4 @@
412412

413413
exports.default = _angular2.default.module('ngWebSocket');
414414
module.exports = exports['default'];
415-
});
415+
});

‎src/angular-websocket.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import angular from 'angular';
22

33
var Socket;
44

5-
if (typeof exports === 'object'&&typeofrequire==='function') {
5+
if (typeof window === 'undefined') {
66
try {
77
var ws = require('ws');
88

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /