Permalink
Browse files

Bug 827341: Warn and use default icon when using relative icon path

  • Loading branch information...
1 parent d6baf70 commit 069afc2c0dcf21e60fd5a91f44942d17a421f3a5 @ochameau ochameau committed Jan 7, 2013
Showing with 7 additions and 0 deletions.
  1. +7 −0 apps/homescreen/js/grid.js
@@ -808,6 +808,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 069afc2

Please sign in to comment.