Skip to content

Commit

Permalink
Fixed an error with web workers not having window
Browse files Browse the repository at this point in the history
  • Loading branch information
Taylor Hakes committed Mar 30, 2015
1 parent 9141b3a commit 049ec5c
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
4 changes: 3 additions & 1 deletion Promise.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@

if (typeof window === 'object' && window) {
root = window;
} else {
} else if (typeof global === 'object' && global) {
root = global;
} else {
root = {};
}

// Use polyfill for setImmediate for performance gains
Expand Down
4 changes: 2 additions & 2 deletions Promise.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "promise-polyfill",
"version": "2.0.0",
"version": "2.0.1",
"homepage": "https://github.com/taylorhakes/promise-polyfill",
"authors": [
"Taylor Hakes"
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "promise-polyfill",
"version": "2.0.0",
"version": "2.0.1",
"description": "Lightweight promise polyfill. A+ compliant",
"main": "Promise.js",
"scripts": {
Expand Down

0 comments on commit 049ec5c

Please sign in to comment.