mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-23 00:29:50 +02:00
Don't add ignore fix more than once
Tweak hidden issues text
This commit is contained in:
@@ -221,7 +221,8 @@ export function coreValidator(context) {
|
||||
|
||||
var detected = fn(entity, context);
|
||||
detected.forEach(function(issue) {
|
||||
if (issue.severity === 'warning') {
|
||||
var hasIgnoreFix = issue.fixes && issue.fixes.length && issue.fixes[issue.fixes.length - 1].type === 'ignore';
|
||||
if (issue.severity === 'warning' && !hasIgnoreFix) {
|
||||
var ignoreFix = new validationIssueFix({
|
||||
title: t('issues.fix.ignore_issue.title'),
|
||||
icon: 'iD-icon-close',
|
||||
@@ -229,6 +230,7 @@ export function coreValidator(context) {
|
||||
ignoreIssue(this.issue.id);
|
||||
}
|
||||
});
|
||||
ignoreFix.type = 'ignore';
|
||||
ignoreFix.issue = issue;
|
||||
issue.fixes.push(ignoreFix);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user