laravel-echo
Advanced tools
Comparing version 1.2.5 to 1.2.6
@@ -212,3 +212,3 @@ var asyncGenerator = function () { | ||
return this.options.csrfToken; | ||
} else if (document && (selector = document.querySelector('meta[name="csrf-token"]'))) { | ||
} else if (typeof document !== 'undefined' && (selector = document.querySelector('meta[name="csrf-token"]'))) { | ||
return selector.getAttribute('content'); | ||
@@ -694,2 +694,7 @@ } | ||
this.connector = new PusherConnector(this.options); | ||
} else if (this.options.broadcaster == 'pusher/react-native') { | ||
if (!window['Pusher']) { | ||
window['Pusher'] = require('pusher-js/react-native'); | ||
} | ||
this.connector = new PusherConnector(this.options); | ||
} else if (this.options.broadcaster == 'socket.io') { | ||
@@ -696,0 +701,0 @@ this.connector = new SocketIoConnector(this.options); |
{ | ||
"name": "laravel-echo", | ||
"version": "1.2.5", | ||
"version": "1.2.6", | ||
"description": "Laravel Echo library for beautiful Pusher and Socket.IO integration", | ||
@@ -5,0 +5,0 @@ "main": "dist/echo.js", |
@@ -68,3 +68,3 @@ import { Channel, PresenceChannel } from './../channel'; | ||
return this.options.csrfToken; | ||
} else if (document && (selector = document.querySelector('meta[name="csrf-token"]'))) { | ||
} else if (typeof document !== 'undefined' && (selector = document.querySelector('meta[name="csrf-token"]'))) { | ||
return selector.getAttribute('content'); | ||
@@ -71,0 +71,0 @@ } |
@@ -45,3 +45,3 @@ import { EventFormatter } from './util'; | ||
if (this.options.broadcaster == 'pusher') { | ||
if (!window['Pusher']) { | ||
if (! window['Pusher']) { | ||
window['Pusher'] = require('pusher-js'); | ||
@@ -51,2 +51,8 @@ } | ||
this.connector = new PusherConnector(this.options); | ||
} else if (this.options.broadcaster == 'pusher/react-native') { | ||
if (! window['Pusher']) { | ||
window['Pusher'] = require('pusher-js/react-native'); | ||
} | ||
this.connector = new PusherConnector(this.options); | ||
} else if (this.options.broadcaster == 'socket.io') { | ||
@@ -53,0 +59,0 @@ this.connector = new SocketIoConnector(this.options); |
155442
3932