From e0f75cb38d367963e4dcc0f6cb7526acbd5db61f Mon Sep 17 00:00:00 2001 From: Wlowscha <54003515+Wlowscha@users.noreply.github.com> Date: Tue, 27 May 2025 13:09:48 +0200 Subject: [PATCH] Apply suggestions from code review Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> --- src/ui/party-ui-handler.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/ui/party-ui-handler.ts b/src/ui/party-ui-handler.ts index d07fe3e249e..74d4e5bcb17 100644 --- a/src/ui/party-ui-handler.ts +++ b/src/ui/party-ui-handler.ts @@ -549,7 +549,8 @@ export default class PartyUiHandler extends MessageUiHandler { for (let p = 0; p < globalScene.getPlayerParty().length; p++) { // this for look goes through each of the party pokemon const newPokemon = globalScene.getPlayerParty()[p]; - // this next bit checks to see if the the selected item from the original transfer pokemon exists on the new pokemon [p]; this returns undefined if the new pokemon doesn't have the item at all, otherwise it returns the pokemonHeldItemModifier for that item + // this next bit checks to see if the the selected item from the original transfer pokemon exists on the new pokemon `p` + // this returns `undefined` if the new pokemon doesn't have the item at all, otherwise it returns the `pokemonHeldItemModifier` for that item const matchingModifier = globalScene.findModifier( m => m instanceof PokemonHeldItemModifier && @@ -1165,7 +1166,7 @@ export default class PartyUiHandler extends MessageUiHandler { globalScene.findModifier( m => m instanceof SwitchEffectTransferModifier && - (m as SwitchEffectTransferModifier).pokemonId === globalScene.getPlayerField()[this.fieldIndex].id, + m.pokemonId === globalScene.getPlayerField()[this.fieldIndex].id, ) ); }