Refs #482: colorizer: fixes a warning
With Gecko, a warning appears when an option does not exists in styles.
Showing
1 changed file
with
1 additions
and
1 deletions
... | @@ -105,7 +105,7 @@ var Colorizer = function Colorizer() { | ... | @@ -105,7 +105,7 @@ var Colorizer = function Colorizer() { |
105 | codes.push(background[style.bg]); | 105 | codes.push(background[style.bg]); |
106 | } | 106 | } |
107 | for (var option in options) { | 107 | for (var option in options) { |
108 | if (style[option] === true) { | 108 | if (option in style && style[option] === true) { |
109 | codes.push(options[option]); | 109 | codes.push(options[option]); |
110 | } | 110 | } |
111 | } | 111 | } | ... | ... |
-
Please register or sign in to post a comment