don't crash if anchorEl doesn't exist

v1.18.x
barisusakli 9 years ago
parent 344c771e1c
commit 9dd8572b98

@ -143,8 +143,10 @@ define('navigator', ['forum/pagination', 'components'], function(pagination, com
threshold = 0;
} else {
var anchorEl = components.get('post/anchor', index - 1);
var anchorRect = anchorEl.get(0).getBoundingClientRect();
threshold = anchorRect.top;
if (anchorEl.length) {
var anchorRect = anchorEl.get(0).getBoundingClientRect();
threshold = anchorRect.top;
}
}
}

Loading…
Cancel
Save