There was an error while loading. Please reload this page.
1 parent 7f26310 commit 31c5bb1Copy full SHA for 31c5bb1
1 file changed
src/Cell.js
@@ -124,7 +124,7 @@ export default class Cell {
124
*/
125
setBackground(colorName = 'none') {
126
const color = colorName.toUpperCase();
127
- this._background = COLORS[color] ? color : 'none';
+ this._background = COLORS.hasOwnProperty(color) ? color : 'none';
128
129
return this;
130
}
@@ -146,7 +146,7 @@ export default class Cell {
146
147
setForeground(colorName = 'none') {
148
149
- this._foreground = COLORS[color] ? color : 'none';
+ this._foreground = COLORS.hasOwnProperty(color) ? color : 'none';
150
151
152
0 commit comments