webpack/components/TemplateSyncResult/components/SyncedTemplate/helpers.js in foreman_templates-8.0.0 vs webpack/components/TemplateSyncResult/components/SyncedTemplate/helpers.js in foreman_templates-9.0.0

- old
+ new

@@ -112,26 +112,26 @@ }; const aggregatedErrors = template => { const err = { ...template.errors } || {}; if (template.additionalErrors) { - err.additional = template.additionalErrors; + err.additional = [template.additionalErrors]; } return err; }; const aggregatedMessages = template => { const errors = aggregatedErrors(template); if (template.additionalInfo) { - errors.info = template.additionalInfo; + errors.info = [template.additionalInfo]; } return errors; }; const formatError = (key, value) => { const omitKeys = ['base', 'additional', 'info']; - if (omitKeys.filter(item => key === item)) { + if (omitKeys.includes(key)) { return value; } return `${key}: ${value}`; };