Checking if seciton exist before accessing its properties (#288)
Checking if seciton exist before accessing its properties
This commit is contained in:
@@ -259,6 +259,7 @@
|
||||
let section = document.querySelector(link.hash);
|
||||
|
||||
if (
|
||||
section &&
|
||||
section.offsetTop <= fromTop &&
|
||||
section.offsetTop + section.offsetHeight > fromTop
|
||||
) {
|
||||
|
||||
Reference in New Issue
Block a user