mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-04-26 14:03:28 -04:00
Add check to TomeView
Found a bug while playing Ogre Encampment: click the Chest before clicking past the intro screen and the game throws an error, when `updateSpellPalette` tries to access call `spell.getSource()` but `spell` is undefined. This check keeps the same behavior but handles the error.
This commit is contained in:
parent
5b0b5e4169
commit
10d344504a
1 changed files with 1 additions and 1 deletions
|
@ -202,7 +202,7 @@ module.exports = class TomeView extends CocoView
|
|||
spell = @spellFor thang, spellName
|
||||
unless spell?.canRead()
|
||||
@clearSpellView()
|
||||
@updateSpellPalette thang, spell
|
||||
@updateSpellPalette thang, spell if spell
|
||||
return
|
||||
unless spell.view is @spellView
|
||||
@clearSpellView()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue