Master branch was throwing errors in game for me this morning...when spellDetail was left undefined because spell.name could not be found in spells.json.
So...this just checks to see if spellDetail is defined, and if not reverts to using spell.name.
This is fine for now, but eventually we will want to use spells.json to create in-memory lookup tables at startup so that we can use Lens for more strict safety and turn these O(n) operations into O(1)
Master branch was throwing errors in game for me this morning...when
spellDetail
was left undefined becausespell.name
could not be found in spells.json.So...this just checks to see if
spellDetail
is defined, and if not reverts to usingspell.name
.