Skip to content

Commit

Permalink
Fixing condition in the formatter body (#550)
Browse files Browse the repository at this point in the history
The previous one will always be 'true'.
  • Loading branch information
dmitriev-dyu committed Nov 13, 2020
1 parent 39707b8 commit 1b549b1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/example2-formatters.html
Expand Up @@ -69,7 +69,7 @@ <h2>View Source:</h2>
// the classes are removed and then added during an update, or just added on cell creation
function statusFormatter(row, cell, value, columnDef, dataContext) {
var rtn = { text: value, removeClasses: 'red orange green' };
if (value !== null || value !== "") {
if (value !== null && value !== "") {
if (value < 33) {
rtn.addClasses = "red";
rtn.toolTip = "danger zone";
Expand Down

0 comments on commit 1b549b1

Please sign in to comment.