Permalink
Browse files

Merge pull request #7327 from ochameau/fix-relative-icon-path

Bug 827341: Fix relative icon path
  • Loading branch information...
2 parents c94217a + 069afc2 commit 8e85602d815671b0d3b8ad4fd2247ac58fb4dc8e @vingtetun vingtetun committed Jan 9, 2013
Showing with 7 additions and 0 deletions.
  1. +7 −0 apps/homescreen/js/grid.js
@@ -815,6 +815,13 @@ const GridManager = (function() {
url.indexOf('https://') == 0)
return url;
+ if (url.charAt(0) != '/') {
+ console.warn('`' + manifest.name + '` app icon is invalid. ' +
+ 'Manifest `icons` attribute should contain URLs -or- ' +
+ 'absolute paths from the origin field.');
+ return getDefaultIcon(app);
+ }
+
if (app.origin.slice(-1) == '/')
return app.origin.slice(0, -1) + url;

0 comments on commit 8e85602

Please sign in to comment.