Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

Commit

Permalink
fix(sticky): NPE in
Browse files Browse the repository at this point in the history
fixes #7316.
  • Loading branch information
ThomasBurleson committed Feb 27, 2016
1 parent 38f6651 commit 5cf32d0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/sticky/sticky.js
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,9 @@ function MdSticky($document, $mdConstant, $$rAF, $mdUtil, $compile) {
while (current && current !== contentEl[0]) {
item.top += current.offsetTop;
item.left += current.offsetLeft;
item.right += current.offsetParent.offsetWidth - current.offsetWidth - current.offsetLeft; //Compute offsetRight
if ( current.offsetParent ){
item.right += current.offsetParent.offsetWidth - current.offsetWidth - current.offsetLeft; //Compute offsetRight
}
current = current.offsetParent;
}
item.height = item.element.prop('offsetHeight');
Expand Down

0 comments on commit 5cf32d0

Please sign in to comment.