laravel-echo
Advanced tools
Comparing version 1.2.4 to 1.2.5
@@ -727,7 +727,11 @@ var asyncGenerator = function () { | ||
jQuery.ajaxSetup({ | ||
beforeSend: function beforeSend(xhr) { | ||
xhr.setRequestHeader('X-Socket-Id', _this3.socketId()); | ||
} | ||
}); | ||
if (typeof jQuery.ajax != 'undefined') { | ||
jQuery.ajaxSetup({ | ||
beforeSend: function beforeSend(xhr) { | ||
if (_this3.socketId()) { | ||
xhr.setRequestHeader('X-Socket-Id', _this3.socketId()); | ||
} | ||
} | ||
}); | ||
} | ||
} | ||
@@ -734,0 +738,0 @@ }, { |
{ | ||
"name": "laravel-echo", | ||
"version": "1.2.4", | ||
"version": "1.2.5", | ||
"description": "Laravel Echo library for beautiful Pusher and Socket.IO integration", | ||
@@ -5,0 +5,0 @@ "main": "dist/echo.js", |
@@ -85,7 +85,11 @@ import { EventFormatter } from './util'; | ||
registerjQueryAjaxSetup() { | ||
jQuery.ajaxSetup({ | ||
beforeSend: (xhr) => { | ||
xhr.setRequestHeader('X-Socket-Id', this.socketId()); | ||
} | ||
}); | ||
if (typeof jQuery.ajax != 'undefined' ) { | ||
jQuery.ajaxSetup({ | ||
beforeSend: (xhr) => { | ||
if (this.socketId()) { | ||
xhr.setRequestHeader('X-Socket-Id', this.socketId()); | ||
} | ||
} | ||
}); | ||
} | ||
} | ||
@@ -92,0 +96,0 @@ |
154863
3922