mirror of
https://github.com/smogon/pokemon-showdown.git
synced 2026-06-02 22:08:36 -05:00
Fix returns
This commit is contained in:
parent
7e3c046868
commit
53ab07d2fc
|
|
@ -3038,12 +3038,11 @@ export class Battle {
|
|||
}
|
||||
|
||||
if (side.choice.cantUndo) {
|
||||
side.emitChoiceError(
|
||||
return side.emitChoiceError(
|
||||
this.supportCancel ?
|
||||
`Can't undo: A trapping/disabling effect would cause undo to leak information` :
|
||||
`Can't undo: This battle doesn't support undoing choices`
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
let updated = false;
|
||||
|
|
@ -3060,6 +3059,8 @@ export class Battle {
|
|||
side.clearChoice();
|
||||
|
||||
if (updated) side.emitRequest(side.activeRequest!, true);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1079,12 +1079,11 @@ export class Side {
|
|||
}
|
||||
|
||||
if (this.choice.cantUndo) {
|
||||
this.emitChoiceError(
|
||||
return this.emitChoiceError(
|
||||
this.battle.supportCancel ?
|
||||
`Can't undo: A trapping/disabling effect would cause undo to leak information` :
|
||||
`Can't undo: This battle doesn't support undoing choices`
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
this.clearChoice();
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user