diff --git a/packages/helix-shared-config/src/BaseConfig.js b/packages/helix-shared-config/src/BaseConfig.js index 2d46a817..d975ea0d 100644 --- a/packages/helix-shared-config/src/BaseConfig.js +++ b/packages/helix-shared-config/src/BaseConfig.js @@ -220,4 +220,13 @@ export class BaseConfig { } return YAML.stringify(this.toJSON()); } + + /** + * Return errors encountered in parsing. + * + * @returns {String[]} parsing errors + */ + getErrors() { + return this._document?.errors ?? []; + } } diff --git a/packages/helix-shared-config/src/IndexConfig.js b/packages/helix-shared-config/src/IndexConfig.js index 682763d5..5078b9f6 100644 --- a/packages/helix-shared-config/src/IndexConfig.js +++ b/packages/helix-shared-config/src/IndexConfig.js @@ -193,13 +193,4 @@ export class IndexConfig extends SchemaDerivedConfig { this._version = this._cfg.version; return this; } - - /** - * Return errors encountered in parsing. - * - * @returns {String[]} parsing errors - */ - getErrors() { - return this._document?.errors ?? []; - } }