Encountering an error in the terminal during compilation in an Angular 8 environment. The localhost page navigates fine without console errors. Checked the variable with the dataset property using console.log and it reads correctly. Here's the section of code in question:
let timelineEls = document.querySelectorAll('[data-scroll-timeline]');
scroll.on("scroll", () => {
for ( let i = 0; i < timelineEls.length; i++ ) {
let progress = self.getProgress(timelineEls[i]);
let timelineKey = timelineEls[i].dataset.scrollTimeline;
console.log(timelineEls[i].dataset);
let timeline = timelines[timelineKey]._recent;
let timelineData = timelines[timelineKey];
let duration = timelineData.duration();
if ( progress > 0 && progress <= 1 ) {
timeline.seek(progress * duration);
} else {
if ( progress <= 0 ) {
timelines[timelineKey].seek(0);
} else {
timelines[timelineKey].seek(duration);
}
}
}
})
console.log displays this data: DOMStringMap {scroll: "", scrollTimeline: "albed-anim"}
Any suggestions on how to resolve this error? Seems like a TypeScript issue, but can't pinpoint the cause or solution.
Appreciate any help you can offer.