mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-28 10:06:08 -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()
|
# @thangsTreema.deselectAll()
|
||||||
|
|
||||||
selectAddThang: (e) =>
|
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
|
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'
|
return true if target.attr('id') is 'surface'
|
||||||
target = target.closest('.add-thang-palette-icon')
|
target = target.closest('.add-thang-palette-icon')
|
||||||
|
|
Loading…
Reference in a new issue