fix(echo): support default export constructor
Handle both direct and default Echo exports when initializing the Pusher broadcaster.
This commit is contained in:
parent
00ce43a9d0
commit
29b372d17a
1 changed files with 2 additions and 1 deletions
|
|
@ -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',
|
||||
|
|
|
|||
Loading…
Reference in a new issue