We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 45bc790 commit 974103aCopy full SHA for 974103a
1 file changed
packages/core/src/client.ts
@@ -768,8 +768,8 @@ export abstract class Client<O extends ClientOptions = ClientOptions> {
768
*/
769
public emit(hook: string, ...rest: unknown[]): void {
770
const callbacks = this._hooks[hook];
771
- for (const callback of callbacks || []) {
772
- callback(...rest);
+ if (callbacks) {
+ callbacks.forEach(callback => callback(...rest));
773
}
774
775
0 commit comments