Skip to content

Commit ac81cd3

Browse files
authored
fix(user): global modal submit handlers causing internal errors (#622)
1 parent 23df307 commit ac81cd3

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/creator.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -732,10 +732,9 @@ export class BaseSlashCreator extends (EventEmitter as any as new () => TypedEve
732732
if (this._modalCallbacks.has(modalCallbackKey)) {
733733
this._modalCallbacks.get(modalCallbackKey)!.callback(ctx);
734734
this._modalCallbacks.delete(modalCallbackKey);
735-
return;
735+
} else if (this._modalCallbacks.has(globalCallbackKey)) {
736+
this._modalCallbacks.get(globalCallbackKey)!.callback(ctx);
736737
}
737-
if (this._modalCallbacks.has(globalCallbackKey)) this._modalCallbacks.get(modalCallbackKey)!.callback(ctx);
738-
739738
return;
740739
} catch (err) {
741740
return this.emit('error', err as Error);

0 commit comments

Comments
 (0)