Skip to content
Advertisement

Eslint – ‘observer’ was used before it was defined?

I am trying to solve my order issue I am getting an Eslint error where “observer” was used before it was defined. But when I replace the observer above the onInterSection function I get onIntersection was used before it was defined.

JavaScript

Advertisement

Answer

You could try and write it like this:

JavaScript
User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement