Fixes issue where HeldItem string in PokemonBuilder could be empty.

This commit is contained in:
Deukhoofd 2021-07-09 18:20:18 +02:00
parent a59f73b2f6
commit 8369328719
Signed by: Deukhoofd
GPG Key ID: F63E044490819F6F
1 changed files with 1 additions and 1 deletions

View File

@ -146,7 +146,7 @@ namespace PkmnLibSharp.Battling
PopulateUninitialized(species, forme!, random);
Item? heldItem = null;
if (HeldItem != null)
if (HeldItem != null && !string.IsNullOrWhiteSpace(HeldItem))
{
if (!Library.StaticLibrary.ItemLibrary.TryGet(HeldItem, out heldItem))
{