mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-17 05:55:00 +08:00
Merge pull request #2772 from matrix-org/erikj/fix_null_counter
Fix header counters to correctly handle zero
This commit is contained in:
commit
1165c51c77
@ -122,7 +122,9 @@ module.exports = React.createClass({
|
|||||||
const severity = ev.getContent().severity || "normal";
|
const severity = ev.getContent().severity || "normal";
|
||||||
const stateKey = ev.getStateKey();
|
const stateKey = ev.getStateKey();
|
||||||
|
|
||||||
if (title && value && severity) {
|
// We want a non-empty title but can accept falsey values (e.g.
|
||||||
|
// zero)
|
||||||
|
if (title && value !== undefined) {
|
||||||
counters.push({
|
counters.push({
|
||||||
"title": title,
|
"title": title,
|
||||||
"value": value,
|
"value": value,
|
||||||
|
Loading…
Reference in New Issue
Block a user