Skip to content

Commit

Permalink
fix: $callHook should check hook existence
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Feb 25, 2024
1 parent db99a91 commit 40082ba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/crossws.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export function createCrossWS(opts: AdapterOptions = {}): CrossWS {
},
// Adapter hook
$callHook(name, ...args) {
return opts.adapterHooks?.[name].apply(undefined, args);
return opts.adapterHooks?.[name]?.apply(undefined, args);
},
};
}

0 comments on commit 40082ba

Please sign in to comment.