Skip to content
This repository has been archived by the owner on Mar 13, 2018. It is now read-only.

Commit

Permalink
make icon resist bad values for icon property.
Browse files Browse the repository at this point in the history
  • Loading branch information
sorvell committed Apr 9, 2014
1 parent 15a3580 commit 84868c8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core-icon.html
Original file line number Diff line number Diff line change
Expand Up @@ -153,13 +153,13 @@
},

updateIcon: function() {
if (!this.icon) {
if (!(this.icon && typeof this.icon === 'string')) {
return;
}
var parts = this.icon.split(':');
var icon = parts.pop();
var set = this.getIconset(parts.pop());
if (set) {
if (set && icon) {
var scale = this.size / set.iconSize;
set.applyIcon(this, icon, this.activeTheme, scale);
}
Expand Down

0 comments on commit 84868c8

Please sign in to comment.