Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not compatible ie11 #1453

Closed
philipseo opened this issue Sep 13, 2021 · 2 comments · Fixed by #1463
Closed

Not compatible ie11 #1453

philipseo opened this issue Sep 13, 2021 · 2 comments · Fixed by #1463

Comments

@philipseo
Copy link

philipseo commented Sep 13, 2021

Screenshot 2021-09-13 at 4 30 59 PM

ENG Translate
SCRIPT5007: Cannot get property '__handlers' that is undefined or null reference.

I'm using the versions of the list below.
next.js 11.1.2
swr: 1.0.0

I checked similar issues and tried all the settings at the bottom of the issue, but the same error continues to occur.
ISSUE : #278

I would appreciate it if you could let me know which part to check or try.

@amannn
Copy link
Contributor

amannn commented Sep 15, 2021

I'm also seeing an error in IE11 on a page that only uses SWRConfig from swr:

Invalid calling object

Here's a reproduction: https://csb-13fdo-m9yttv7sk-amann.vercel.app/ (source)

It seems like it comes from the assignment of document.addEventListener to the variables onDocumentEvent and offDocumentEvent.

@amannn
Copy link
Contributor

amannn commented Sep 15, 2021

@philipseo I've added #1463 which solves the bug that I was seeing.

I couldn't reproduce your bug though. I'm currently using SWRConfig, useSWR and useSWRImmutable in my code base. These APIs seem to work in IE11 with the fix from the PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants