Skip to content

Commit

Permalink
fix: getErrors should be available in all configs
Browse files Browse the repository at this point in the history
  • Loading branch information
dominique-pfister committed Oct 9, 2024
1 parent fa02439 commit 4669a26
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
9 changes: 9 additions & 0 deletions packages/helix-shared-config/src/BaseConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 ?? [];
}
}
9 changes: 0 additions & 9 deletions packages/helix-shared-config/src/IndexConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 ?? [];
}
}

0 comments on commit 4669a26

Please sign in to comment.