Skip to content

Commit

Permalink
fix(cell): Fix issue with checking on own property
Browse files Browse the repository at this point in the history
  • Loading branch information
ghaiklor committed May 12, 2016
1 parent 7f26310 commit 31c5bb1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Cell.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ export default class Cell {
*/
setBackground(colorName = 'none') {
const color = colorName.toUpperCase();
this._background = COLORS[color] ? color : 'none';
this._background = COLORS.hasOwnProperty(color) ? color : 'none';

return this;
}
Expand All @@ -146,7 +146,7 @@ export default class Cell {
*/
setForeground(colorName = 'none') {
const color = colorName.toUpperCase();
this._foreground = COLORS[color] ? color : 'none';
this._foreground = COLORS.hasOwnProperty(color) ? color : 'none';

return this;
}
Expand Down

0 comments on commit 31c5bb1

Please sign in to comment.