Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
this._jumpInterval = this._async.setInterval(() => {
const el = document.getElementById(anchor);
if (el || Date.now() - start > 1000) {
this._async.clearInterval(this._jumpInterval);
this._jumpInterval = undefined;
if (el) {
jumpToAnchor(anchor);
}
}
}, 100);
}