A
A
Alexander92922020-11-19 01:13:01
JavaScript
Alexander9292, 2020-11-19 01:13:01

What's wrong - n(...) is not a function?

I made it interactive according to ES6+ standards (the console was clean)
After I run the code through Webpack + Babel, then an error appears - n(...) is not a function
Can you tell me where it comes from? Such variables, functions, etc. did not create in code
5fb59b55deca1938619274.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander9292, 2020-11-19
@Alexander9292

Solved - the problem turned out to be in the closest polyfill call.
To do this, I added a variable, i.e. like this - const elementsClosest = elementClosest(window);

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question