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

Uses 'self' instead of 'window' global variable (#42) #43

Closed
wants to merge 1 commit into from
Closed

Uses 'self' instead of 'window' global variable (#42) #43

wants to merge 1 commit into from

Conversation

yveslange
Copy link
Contributor

window global variable might be define in node (eg: Jest defines it).

It is safer to use self to test if the library is running in the browser environnement or under nodejs.

This is not the perfect answer to resolve the problem but at least, the library will work when using Jest or other libs that defines window in nodejs.

@coveralls
Copy link

coveralls commented Sep 13, 2017

Coverage Status

Coverage remained the same at 92.241% when pulling b35aaee on yveslange:master into 9e2a9bd on shaunxcode:master.

@yveslange yveslange closed this Sep 13, 2017
@yveslange
Copy link
Contributor Author

There is a mistake in this 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 this pull request may close these issues.

None yet

2 participants