Skip to content

Commit

Permalink
golf: inline withCredentials assignment;
Browse files Browse the repository at this point in the history
- 717 gz / 596 br
  • Loading branch information
lukeed committed Dec 14, 2018
1 parent 9df00ff commit 1c94262
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/prefetch.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -55,16 +55,16 @@ function linkPrefetchStrategy(url) {
function xhrPrefetchStrategy(url) {
return new Promise((resolve, reject) => {
const req = new XMLHttpRequest();
req.open(`GET`, url, true);
req.withCredentials = true;

req.open(`GET`, url, req.withCredentials=true);

req.onload = () => {
(req.status === 200) ? resolve() : reject();
};

req.send();
});
};
}

/**
* Fetches a given URL using the Fetch API. Falls back
Expand Down

0 comments on commit 1c94262

Please sign in to comment.