Skip to content

Improve the detection of global/root object#804

Merged
aearly merged 1 commit intocaolan:masterfrom
megawac:root-detection
Jun 24, 2015
Merged

Improve the detection of global/root object#804
aearly merged 1 commit intocaolan:masterfrom
megawac:root-detection

Conversation

@megawac
Copy link
Copy Markdown
Collaborator

@megawac megawac commented Jun 24, 2015

Refer to jashkenas/underscore#2152. We were using a similar approach to asyncs current one in underscore until jashkenas/underscore#2153.

The two main benefits of this change are:

Aside: here's the detection method from lodash

@aearly
Copy link
Copy Markdown
Collaborator

aearly commented Jun 24, 2015

Should we explicitly check for window? If async.js gets wrapped in something that adds strict mode, this in the check will be null.

@megawac
Copy link
Copy Markdown
Collaborator Author

megawac commented Jun 24, 2015

Self covers that case
On Jun 24, 2015 6:11 PM, "Alexander Early" notifications@github.com wrote:

Should we explicitly check for window? If async.js gets wrapped in
something that adds strict mode, this in the check will be null.


Reply to this email directly or view it on GitHub
#804 (comment).

@aearly
Copy link
Copy Markdown
Collaborator

aearly commented Jun 24, 2015

OK, cool. 👍

aearly added a commit that referenced this pull request Jun 24, 2015
Improve the detection of global/root object
@aearly aearly merged commit c5e71ef into caolan:master Jun 24, 2015
@megawac megawac mentioned this pull request Jul 10, 2015
14 tasks
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