Improve i18n support and config validation
This commit is contained in:
parent
4f83ae8802
commit
37db38b613
9 changed files with 152 additions and 152 deletions
|
|
@ -16,9 +16,6 @@ type Props = CollectionEntry<"games">["data"];
|
|||
const { props } = Astro;
|
||||
const series = props.series && (await getEntry(props.series));
|
||||
const authors = await getEntries([props.authors].flat());
|
||||
if ("" in props.copyrightedCharacters && Object.keys(props.copyrightedCharacters).length > 1) {
|
||||
throw new Error("copyrightedCharacter cannot use empty key (catch-all) with other keys");
|
||||
}
|
||||
const copyrightedCharacters = await Promise.all(
|
||||
Object.values(
|
||||
Object.keys(props.copyrightedCharacters).reduce(
|
||||
|
|
|
|||
|
|
@ -26,9 +26,6 @@ const series = props.series && (await getEntry(props.series));
|
|||
const authors = await getEntries([props.authors].flat());
|
||||
const commissioner = props.commissioner && (await getEntry(props.commissioner));
|
||||
const requester = props.requester && (await getEntry(props.requester));
|
||||
if ("" in props.copyrightedCharacters && Object.keys(props.copyrightedCharacters).length > 1) {
|
||||
throw new Error("copyrightedCharacter cannot use empty key (catch-all) with other keys");
|
||||
}
|
||||
const copyrightedCharacters = await Promise.all(
|
||||
Object.values(
|
||||
Object.keys(props.copyrightedCharacters).reduce(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue