Skip to content

Commit

Permalink
adding a type
Browse files Browse the repository at this point in the history
  • Loading branch information
brandenrodgers committed Sep 26, 2023
1 parent 8ed1053 commit de6ac0e
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions lib/cms/functions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ function updateExistingConfig(

let config!: Config;
try {
config = JSON.parse(configString);
config = JSON.parse(configString) as Config;
} catch (err) {
debug(`${i18nKey}.updateExistingConfig.invalidJSON`, {
configFilePath,
Expand All @@ -90,9 +90,10 @@ function updateExistingConfig(
}

if (!isObject(config)) {
throwErrorWithMessage(`${i18nKey}.updateExistingConfig.configIsNotObjectError`, {
configFilePath,
});
throwErrorWithMessage(
`${i18nKey}.updateExistingConfig.configIsNotObjectError`,
{ configFilePath }
);
}
if (config.endpoints) {
if (config.endpoints[endpointPath]) {
Expand Down

0 comments on commit de6ac0e

Please sign in to comment.