We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8a0bbf5 commit 4ca3b75Copy full SHA for 4ca3b75
1 file changed
scripts/generateLocales.ts
@@ -282,10 +282,12 @@ for (const locale of locales) {
282
try {
283
// eslint-disable-next-line @typescript-eslint/no-var-requires
284
const metadata: MetadataDefinitions = require(pathMetadata).default;
285
- localeTitle = metadata.title;
286
- if (!localeTitle) {
+ const { title } = metadata;
+ if (!title) {
287
throw new Error(`No title property found on ${JSON.stringify(metadata)}`);
288
}
289
+
290
+ localeTitle = title;
291
} catch (e) {
292
console.error(
293
`Failed to load ${pathMetadata}. Please make sure the file exists and exports MetadataDefinitions.`
0 commit comments