I've been using a package called ui-observer for years, which depends on fastdom. I am now using it with the new "App router" in NextJS, which runs fastdom on the server. This should be fine, but for some reason, this is undefined in global scope, but globalThis works.
Can we fix this error? I can submit a pull request if that helps. Here is the diff that solved the problem.
Hi! 👋
Firstly, thanks for your work on this project! 🙂
I've been using a package called ui-observer for years, which depends on fastdom. I am now using it with the new "App router" in NextJS, which runs fastdom on the server. This should be fine, but for some reason,
this
isundefined
in global scope, butglobalThis
works.Can we fix this error? I can submit a pull request if that helps. Here is the diff that solved the problem.
fastdom@1.0.11
Sinceerly, Hedinn