From de6ac0ec59a3ac755b97ddbf6599754658b1d633 Mon Sep 17 00:00:00 2001 From: Branden Rodgers Date: Tue, 26 Sep 2023 16:05:11 -0400 Subject: [PATCH] adding a type --- lib/cms/functions.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/cms/functions.ts b/lib/cms/functions.ts index 327f1f07..f82bf322 100644 --- a/lib/cms/functions.ts +++ b/lib/cms/functions.ts @@ -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, @@ -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]) {