fix: newLocale fallback to 'en' locale (#11808)

pull/11818/head
Alex van Andel 2023-10-10 23:06:48 +01:00 committed by GitHub
parent 39c3ef0d94
commit 38f389bce9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -46,7 +46,8 @@ class MyDocument extends Document<Props> {
}
render() {
const { isEmbed, embedColorScheme, newLocale } = this.props;
const { isEmbed, embedColorScheme } = this.props;
const newLocale = this.props.newLocale || "en";
const nonceParsed = z.string().safeParse(this.props.nonce);
const nonce = nonceParsed.success ? nonceParsed.data : "";