don't crash if anchorEl doesn't exist

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

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

Loading…
Cancel
Save