Skip to content

Commit

Permalink
Merge pull request #52 from github/self
Browse files Browse the repository at this point in the history
Assign to self
  • Loading branch information
josh committed Dec 29, 2014
2 parents 75bb3eb + 1898d56 commit 8beeeee
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
7 changes: 3 additions & 4 deletions .jshintrc
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,10 @@
"unused": true,
"strict": true,
"trailing": true,
"boss": true,
"asi": true,
"boss": true,
"esnext": true,
"eqnull": true,
"browser": true,
"globals": {
"Promise": false
}
"worker": true
}
8 changes: 4 additions & 4 deletions fetch.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
(function(global) {
(function() {
'use strict';

if (global.fetch) {
if (self.fetch) {
return
}

Expand Down Expand Up @@ -203,7 +203,7 @@

Body.call(Response.prototype)

global.fetch = function (url, options) {
self.fetch = function (url, options) {
return new Request(url, options).fetch()
}
})(this);
})();
4 changes: 3 additions & 1 deletion test/.jshintrc
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,13 @@
"undef": true,
"unused": true,
"trailing": true,
"boss": true,
"asi": true,
"boss": true,
"esnext": true,
"sub": true,
"eqnull": true,
"browser": true,
"worker": true,
"globals": {
"MockXHR": false,
"QUnit": false,
Expand Down

0 comments on commit 8beeeee

Please sign in to comment.