mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-15 05:30:35 +02:00
use severity in test
This commit is contained in:
@@ -15,11 +15,11 @@ export function uiCommitWarnings(context) {
|
||||
var validations = context.history().validate(changes);
|
||||
|
||||
validations = _reduce(validations, function(validations, val) {
|
||||
var type = val.id === 'mapcss_error' ? 'error' : 'warning';
|
||||
if (validations.hasOwnProperty(type)) {
|
||||
validations[type].push(val);
|
||||
var severity = val.severity;
|
||||
if (validations.hasOwnProperty(severity)) {
|
||||
validations[severity].push(val);
|
||||
} else {
|
||||
validations[type] = [val];
|
||||
validations[severity] = [val];
|
||||
}
|
||||
return validations;
|
||||
}, {});
|
||||
|
||||
Reference in New Issue
Block a user