Skip to content
This repository was archived by the owner on Jun 5, 2020. It is now read-only.

Better check for node.js context #33

Merged
merged 1 commit into from
Jul 29, 2015
Merged

Better check for node.js context #33

merged 1 commit into from
Jul 29, 2015

Conversation

kethinov
Copy link
Contributor

Checking for window will produce a false negative in some contexts, such as iron-node (I tested this, it fails) and possibly NW.js (untested, but I suspect it might also fail) which provide both node features like require, module, and process, as well as window.

This tweak checks more explicitly for things that are exclusive to node and should not produce a false negative if node features and window are both present.

dcodeIO added a commit that referenced this pull request Jul 29, 2015
Better check for node.js context
@dcodeIO dcodeIO merged commit 08d5114 into dcodeIO:master Jul 29, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants