Skip to content

Commit

Permalink
chore: gracefully log errors
Browse files Browse the repository at this point in the history
to give debugging a chance
  • Loading branch information
davidenke committed Nov 10, 2024
1 parent 745892e commit dc2fda7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/utils/decap.utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,9 @@ export async function parseConfig(ymlData: string): Promise<CmsConfig | undefine
const { default: decapConfig } = await import('decap-cms-core/dist/esm/actions/config.js');

try {
return normalizeConfig(parseConfig(ymlData) ?? {});
} catch (_error) {
return decapConfig.normalizeConfig(decapConfig.parseConfig(ymlData) ?? {});
} catch (error) {
console.warn('Problems parsing Decap CMS config:', error);
return undefined;
}
}
Expand Down

0 comments on commit dc2fda7

Please sign in to comment.