Fixes issue where HeldItem string in PokemonBuilder could be empty.

This commit is contained in:
Deukhoofd committed 2021-07-09 18:20:18 +02:00
1 parent a59f73b2f6
commit 8369328719
1 file changed
+1 -1
+1 -1
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))
{