Browse Source

Fix exception in $.scrollParent

Thibaut Courouble 9 years ago
parent
commit
55de422d55
1 changed files with 1 additions and 1 deletions
  1. 1 1
      assets/javascripts/lib/util.coffee

+ 1 - 1
assets/javascripts/lib/util.coffee

@@ -157,7 +157,7 @@ $.offset = (el, container = document.body) ->
 $.scrollParent = (el) ->
   while el = el.parentElement
     break if el.scrollTop > 0
-    break if getComputedStyle(el).overflowY in ['auto', 'scroll']
+    break if getComputedStyle(el)?.overflowY in ['auto', 'scroll']
   el
 
 $.scrollTo = (el, parent, position = 'center', options = {}) ->