diff --git a/modules/ui/commit.js b/modules/ui/commit.js index 6e25b1b81..94b6e3b00 100644 --- a/modules/ui/commit.js +++ b/modules/ui/commit.js @@ -24,6 +24,7 @@ var readOnlyTags = [ /^imagery_used$/, /^host$/, /^locale$/, + /^warnings$/, /^warnings:/ ]; @@ -116,7 +117,7 @@ export function uiCommit(context) { // remove existing warning counts for (var key in tags) { - if (key.match(/^warnings:/)) { + if (key === 'warnings' || key.match(/^warnings:/)) { delete tags[key]; } } @@ -125,6 +126,10 @@ export function uiCommit(context) { var warnings = context.validator() .getIssuesBySeverity({ what: 'edited', where: 'all' }).warning; + if (warnings.length) { + tags.warnings = warnings.length.toString(); + } + var warningsByType = utilArrayGroupBy(warnings, 'type'); for (var warningType in warningsByType) { tags['warnings:' + warningType] = warningsByType[warningType].length.toString();