fix: function name

This commit is contained in:
Daniel Lautzenheiser 2023-10-12 12:03:47 -04:00
parent c37f44b5f5
commit c3c246b5f1

View File

@ -296,7 +296,7 @@ function collectionDepth<EF extends BaseField>(collection: Collection<EF>) {
return depth; return depth;
} }
function i18nRulestring(ruleString: string, { defaultLocale, structure }: I18nInfo): string { function i18nRuleString(ruleString: string, { defaultLocale, structure }: I18nInfo): string {
if (structure === I18N_STRUCTURE_MULTIPLE_FOLDERS) { if (structure === I18N_STRUCTURE_MULTIPLE_FOLDERS) {
return `${defaultLocale}\\/${ruleString}`; return `${defaultLocale}\\/${ruleString}`;
} }
@ -316,7 +316,7 @@ function collectionRegex<EF extends BaseField>(collection: Collection<EF>): RegE
} }
if (hasI18n(collection)) { if (hasI18n(collection)) {
ruleString = i18nRulestring(ruleString, getI18nInfo(collection)); ruleString = i18nRuleString(ruleString, getI18nInfo(collection));
} }
return ruleString ? new RegExp(ruleString) : undefined; return ruleString ? new RegExp(ruleString) : undefined;