fix(echo): support default export constructor

Handle both direct and default Echo exports when initializing the Pusher broadcaster.
This commit is contained in:
Andras Bacsai committed 2026-05-22 13:53:35 +02:00
1 parent 00ce43a9d0
commit 29b372d17a
1 file changed
+2 -1
+2 -1
View File
@@ -172,7 +172,8 @@
}
@auth
window.Pusher = Pusher;
window.Echo = new Echo({
const EchoConstructor = typeof Echo === 'function' ? Echo : Echo.default;
window.Echo = new EchoConstructor({
broadcaster: 'pusher',
cluster: "{{ config('constants.pusher.host') }}" || window.location.hostname,
key: "{{ config('constants.pusher.app_key') }}" || 'coolify',