Skip to content

Commit

Permalink
fix problem when using webpack (#83)
Browse files Browse the repository at this point in the history
* fix problem when using webpack

Fixed issue #82

* Update angular-websocket.js
  • Loading branch information
Head authored and PatrickJS committed Jun 21, 2016
1 parent 5f3d16b commit 4a11420
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions dist/angular-websocket.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

var Socket;

if ((typeof exports === 'undefined' ? 'undefined' : _typeof(exports)) === 'object' && typeof require === 'function') {
if (typeof window === 'undefined') {
try {

Socket = ws.Client || ws.client || ws;
Expand Down Expand Up @@ -412,4 +412,4 @@

exports.default = _angular2.default.module('ngWebSocket');
module.exports = exports['default'];
});
});
2 changes: 1 addition & 1 deletion src/angular-websocket.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import angular from 'angular';

var Socket;

if (typeof exports === 'object' && typeof require === 'function') {
if (typeof window === 'undefined') {
try {
var ws = require('ws');

Expand Down

0 comments on commit 4a11420

Please sign in to comment.