Skip to content

Commit e8b4024

Browse files
committed
Fix localize spread args
1 parent 588a76e commit e8b4024

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

packages/component/src/Utils/LocalizedString.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ const pluralPropsSchema = pipe(
3838
many: optional(string()),
3939
other: string()
4040
}),
41-
values: optional(pipe(tupleWithRest([number()], union([string()])), readonly()))
41+
values: pipe(tupleWithRest([number()], union([string()])), readonly())
4242
}),
4343
readonly()
4444
);
@@ -88,7 +88,7 @@ const LocalizedString = (props: LocalizedStringProps) => {
8888
} else {
8989
const { stringIds, values } = props;
9090

91-
localized = localizeSingular(stringIds, ...values);
91+
localized = localizeSingular(stringIds, ...(values || []));
9292
}
9393

9494
const documentFragment = parseDocumentFragmentFromString(micromark(localized));

0 commit comments

Comments
 (0)