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

Check for document in environment before accessing #5

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

mdarens
Copy link

@mdarens mdarens commented Mar 21, 2019

Fixes #4

@yeskunall
Copy link
Collaborator

@mdarens thank you for the PR! I like it.

It looks like react-dom-status-hook might also be affected by the problem you mentioned in #4. Do you mind making the same change here as well?

export const initialState: IDOMReadyState = {
readyState: document.readyState,
};

If however you need this fixed urgently, ping me, and I’ll go ahead and merge this. Thanks for the help so far! 💖

@mdarens
Copy link
Author

mdarens commented Mar 22, 2019

I can look at that one too but as you may have noticed by now I goofed on the TS syntax & didn't annotate the new initial state as a function which returns an interface, so I just implemented it in plain ES for my needs.

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.

2 participants