mirror of
https://github.com/iflytek/skillhub.git
synced 2026-10-08 03:07:51 +00:00
fix(web): avoid replaceAll in admin label form
This commit is contained in:
parent
54b165e188
commit
e6abc83133
1 changed files with 1 additions and 1 deletions
|
|
@ -64,7 +64,7 @@ export function normalizeLabelFormState(form: LabelFormState): LabelFormState {
|
|||
sortOrder: Number.isFinite(form.sortOrder) ? form.sortOrder : 0,
|
||||
translations: form.translations
|
||||
.map((translation) => ({
|
||||
locale: translation.locale.trim().replaceAll('_', '-').toLowerCase(),
|
||||
locale: translation.locale.trim().replace(/_/g, '-').toLowerCase(),
|
||||
displayName: translation.displayName.trim(),
|
||||
}))
|
||||
.filter((translation) => translation.locale && translation.displayName),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue