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

NodeJS compatibility breaks on the windows checks #1

Closed
chrisramakers opened this issue Mar 19, 2012 · 0 comments
Closed

NodeJS compatibility breaks on the windows checks #1

chrisramakers opened this issue Mar 19, 2012 · 0 comments

Comments

@chrisramakers
Copy link

The exception handling part breaks NodeJS compatibility because checking for the presence of windows triggers a nodejs error. It's better to check if window is defined by checking it's type like below.

if(typeof(window) !== 'undefined') {
    // do stuff with window
}

I haven't checked the rest of the methods for nodejs compatiblity, this just popped up by just including the file in my nodejs project.

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

No branches or pull requests

2 participants