+
{
- const index = mapValues.findIndex(item => this.scrollContainer.scrollTop > item - 75);
+ const index = mapValues.findIndex(item => that.scrollContainer.scrollTop > item - 75);
if (cachedIndex !== index && index !== -1) {
- this.active = mapKeys[index];
+ that.active = mapKeys[index];
cachedIndex = index;
- document.getElementById(this.active).focus();
+ document.getElementById(that.active) && document.getElementById(that.active).focus();
}
});
});
@@ -87,16 +86,27 @@ export default {