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

Fix visibilityState type #101

Merged
merged 1 commit into from
Nov 8, 2019
Merged

Conversation

StarHyx
Copy link
Contributor

@StarHyx StarHyx commented Nov 8, 2019

prerender is deprecated in Document.visibilityState, so it is undefined in lib.dom.d.ts

@see https://developer.mozilla.org/en-US/docs/Web/API/Document/visibilityState

The editor will show error in document.visibilityState === 'prerender'

20191108163125

45D75031-25AC-4426-9411-E577C3D55332

So whe can use document.visibilityState !== 'hidden' instead。It's compatible with the deprecated value and passable with editor checking~

@shuding shuding merged commit 7bb1172 into vercel:master Nov 8, 2019
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 this pull request may close these issues.

None yet

2 participants