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 2026-05-22 13:53:35 +02:00
parent 00ce43a9d0
commit 29b372d17a

View file

@ -172,7 +172,8 @@ function checkTheme() {
}
@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',