mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-24 16:17:57 -05:00
Merge pull request #863 from dpen2000/FixTypeError
Fix javascript error occuring when e is null/undefined
This commit is contained in:
commit
2230b32829
1 changed files with 1 additions and 1 deletions
|
@ -255,7 +255,7 @@ module.exports = class ThangsTabView extends View
|
|||
# @thangsTreema.deselectAll()
|
||||
|
||||
selectAddThang: (e) =>
|
||||
return unless $(e.target).closest('.editor-level-thangs-tab-view').length
|
||||
return unless e? and $(e.target).closest('.editor-level-thangs-tab-view').length
|
||||
if e then target = $(e.target) else target = @$el.find('.add-thangs-palette') # pretend to click on background if no event
|
||||
return true if target.attr('id') is 'surface'
|
||||
target = target.closest('.add-thang-palette-icon')
|
||||
|
|
Loading…
Reference in a new issue