mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-19 06:42:20 +02:00
Apply suggestions from code review
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
This commit is contained in:
parent
bdf6dede04
commit
97f0a1e221
@ -2026,7 +2026,7 @@ export default class PokedexPageUiHandler extends MessageUiHandler {
|
||||
}
|
||||
break;
|
||||
case Button.LEFT:
|
||||
if (this.filteredIndices && this.filteredIndices.length <= 1) {
|
||||
if (this.filteredIndices?.length <= 1) {
|
||||
ui.playError();
|
||||
this.blockInput = false;
|
||||
return true;
|
||||
@ -2066,7 +2066,7 @@ export default class PokedexPageUiHandler extends MessageUiHandler {
|
||||
this.blockInput = false;
|
||||
break;
|
||||
case Button.RIGHT:
|
||||
if (this.filteredIndices && this.filteredIndices.length <= 1) {
|
||||
if (this.filteredIndices?.length <= 1) {
|
||||
ui.playError();
|
||||
this.blockInput = false;
|
||||
return true;
|
||||
@ -2230,10 +2230,8 @@ export default class PokedexPageUiHandler extends MessageUiHandler {
|
||||
|
||||
const ui = this.getUi();
|
||||
|
||||
const isFormCaught = this.isFormCaught();
|
||||
const isSeen = this.isSeen();
|
||||
|
||||
if ((this.isCaught() && isFormCaught) || isSeen) {
|
||||
if ((this.isCaught() && this.isFormCaught()) || this.isSeen()) {
|
||||
ui.showText(this.menuDescriptions[cursor]);
|
||||
} else {
|
||||
ui.showText("");
|
||||
|
Loading…
Reference in New Issue
Block a user