laravel-echo
Advanced tools
Comparing version 1.2.6 to 1.2.7
@@ -690,3 +690,4 @@ var asyncGenerator = function () { | ||
if (!window['Pusher']) { | ||
window['Pusher'] = require('pusher-js'); | ||
var pusherJs = 'pusher-js'; | ||
window['Pusher'] = require('' + pusherJs); | ||
} | ||
@@ -696,3 +697,4 @@ this.connector = new PusherConnector(this.options); | ||
if (!window['Pusher']) { | ||
window['Pusher'] = require('pusher-js/react-native'); | ||
var pusherReactNative = 'pusher-js/react-native'; | ||
window['Pusher'] = require('' + pusherReactNative); | ||
} | ||
@@ -699,0 +701,0 @@ this.connector = new PusherConnector(this.options); |
{ | ||
"name": "laravel-echo", | ||
"version": "1.2.6", | ||
"version": "1.2.7", | ||
"description": "Laravel Echo library for beautiful Pusher and Socket.IO integration", | ||
@@ -5,0 +5,0 @@ "main": "dist/echo.js", |
@@ -46,3 +46,5 @@ import { EventFormatter } from './util'; | ||
if (! window['Pusher']) { | ||
window['Pusher'] = require('pusher-js'); | ||
let pusherJs = 'pusher-js'; | ||
window['Pusher'] = require('' + pusherJs); | ||
} | ||
@@ -52,7 +54,9 @@ | ||
} else if (this.options.broadcaster == 'pusher/react-native') { | ||
if (! window['Pusher']) { | ||
window['Pusher'] = require('pusher-js/react-native'); | ||
} | ||
if (! window['Pusher']) { | ||
let pusherReactNative = 'pusher-js/react-native'; | ||
this.connector = new PusherConnector(this.options); | ||
window['Pusher'] = require('' + pusherReactNative); | ||
} | ||
this.connector = new PusherConnector(this.options); | ||
} else if (this.options.broadcaster == 'socket.io') { | ||
@@ -93,8 +97,8 @@ this.connector = new SocketIoConnector(this.options); | ||
registerjQueryAjaxSetup() { | ||
if (typeof jQuery.ajax != 'undefined' ) { | ||
if (typeof jQuery.ajax != 'undefined') { | ||
jQuery.ajaxSetup({ | ||
beforeSend: (xhr) => { | ||
if (this.socketId()) { | ||
xhr.setRequestHeader('X-Socket-Id', this.socketId()); | ||
} | ||
if (this.socketId()) { | ||
xhr.setRequestHeader('X-Socket-Id', this.socketId()); | ||
} | ||
} | ||
@@ -101,0 +105,0 @@ }); |
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
155695
3936
2