diff --git a/src/js/models/metadata/eml211/EML211.js b/src/js/models/metadata/eml211/EML211.js index 87aeb3bd5..d4dfe724c 100644 --- a/src/js/models/metadata/eml211/EML211.js +++ b/src/js/models/metadata/eml211/EML211.js @@ -1712,32 +1712,8 @@ define([ // Validate the EMLAnnotation models const annotations = this.get("annotations"); const annotationErrors = annotations.validate(); - // if (annotationErrors) { - // // Put canonicalDataset annotation errors in their own category - // // so they can be displayed in the special canonicalDataset field. - // const canonicalErrors = []; - // const errorsToRemove = []; - // // Check for a canonicalDataset annotation error - // annotationErrors.forEach((annotationError, i) => { - // if (annotationError.isCanonicalDataset) { - // canonicalErrors.push(annotationError); - // errorsToRemove.push(i); - // } - // }); - // // Remove canonicalDataset errors from the annotation errors - // // backwards so we don't mess up the indexes. - // errorsToRemove.reverse().forEach((i) => { - // annotationErrors.splice(i, 1); - // }); - - // if (canonicalErrors.length) { - // // The two canonicalDataset errors are the same, so just show one. - // errors.canonicalDataset = canonicalErrors[0].message; - // } - // } - // Add the rest of the annotation errors if there are any - // non-canonical left - if (annotationErrors.length) { + + if (annotationErrors?.length) { errors.annotations = annotationErrors.filter( (e) => e.attr !== "canonicalDataset", );