Skip to content

Commit

Permalink
fix(user): global modal submit handlers causing internal errors (#622)
Browse files Browse the repository at this point in the history
  • Loading branch information
maradotwebp authored Jul 21, 2024
1 parent 23df307 commit ac81cd3
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/creator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -732,10 +732,9 @@ export class BaseSlashCreator extends (EventEmitter as any as new () => TypedEve
if (this._modalCallbacks.has(modalCallbackKey)) {
this._modalCallbacks.get(modalCallbackKey)!.callback(ctx);
this._modalCallbacks.delete(modalCallbackKey);
return;
} else if (this._modalCallbacks.has(globalCallbackKey)) {
this._modalCallbacks.get(globalCallbackKey)!.callback(ctx);
}
if (this._modalCallbacks.has(globalCallbackKey)) this._modalCallbacks.get(modalCallbackKey)!.callback(ctx);

return;
} catch (err) {
return this.emit('error', err as Error);
Expand Down

0 comments on commit ac81cd3

Please sign in to comment.