Browse Source

Prevent exception in SidebarHover#isTarget

Thibaut 10 years ago
parent
commit
bd3fc20b83
1 changed files with 1 additions and 1 deletions
  1. 1 1
      assets/javascripts/views/sidebar/sidebar_hover.coffee

+ 1 - 1
assets/javascripts/views/sidebar/sidebar_hover.coffee

@@ -53,7 +53,7 @@ class app.views.SidebarHover extends app.View
     clone
     clone
 
 
   isTarget: (el) ->
   isTarget: (el) ->
-    el.classList.contains @constructor.itemClass
+    el?.classList?.contains @constructor.itemClass
 
 
   isSelected: (el) ->
   isSelected: (el) ->
     el.classList.contains 'active'
     el.classList.contains 'active'