소스 검색

Fix exception in $.scrollParent

Thibaut Courouble 8 년 전
부모
커밋
0240932198
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      assets/javascripts/lib/util.coffee

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

@@ -158,7 +158,7 @@ $.offset = (el, container = document.body) ->
   left: left
 
 $.scrollParent = (el) ->
-  while el.nodeType is 1 and el = el.parentNode
+  while (el = el.parentNode) and el.nodeType is 1
     break if el.scrollTop > 0
     break if getComputedStyle(el)?.overflowY in ['auto', 'scroll']
   el