Skip to content

Commit

Permalink
fix broken largestSize
Browse files Browse the repository at this point in the history
  • Loading branch information
samthor committed Sep 14, 2020
1 parent b232774 commit 7f8a900
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions pwacompat.min.js

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

5 changes: 2 additions & 3 deletions src/pwacompat.js
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ function unused() {
// Get the largest size from a processed icon.
largestSize: Math.max.apply(null, parsedSizes),
purpose: icon.purpose ? icon.purpose.split(/\s+/g) : ['any'],
}
};
}

/**
Expand All @@ -210,8 +210,7 @@ function unused() {
if (!isSafariMobile) {
return;
}
const dim = largestSize(icon);
if (dim < appleIconSizeMin) {
if (icon.largestSize < appleIconSizeMin) {
return;
}
attr['rel'] = 'apple-touch-icon';
Expand Down

0 comments on commit 7f8a900

Please sign in to comment.