Skip to content

Commit

Permalink
golf: remove duplicate typeof document check;
Browse files Browse the repository at this point in the history
- can only enter `linkPrefetchStrategy()` if `support()` passed – which includes same check
- 735 gz / 601 br
  • Loading branch information
lukeed committed Dec 11, 2018
1 parent f7cb14e commit 1662c0c
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions src/prefetch.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,6 @@ function support(feature) {
*/
function linkPrefetchStrategy(url) {
return new Promise((resolve, reject) => {
if (typeof document === `undefined`) {
reject();
return;
}

const link = document.createElement(`link`);
link.rel = `prefetch`;
link.href = url;
Expand Down

0 comments on commit 1662c0c

Please sign in to comment.