Update getModelByPluralName to use replaceAll for whitespace handling
- Modified the getModelByPluralName function to utilize replaceAll instead of replace for improved whitespace removal in formatted names, enhancing consistency in model name formatting.
This commit is contained in:
parent
b6834fecc6
commit
444e694593
@ -194,7 +194,7 @@ export function getModelByName(name, ignoreCase = false) {
|
|||||||
export function getModelByPluralName(pluralName, ignoreCase = false) {
|
export function getModelByPluralName(pluralName, ignoreCase = false) {
|
||||||
function formatName(formattedName) {
|
function formatName(formattedName) {
|
||||||
if (ignoreCase == true) {
|
if (ignoreCase == true) {
|
||||||
formattedName = formattedName.toUpperCase().replace(' ', '')
|
formattedName = formattedName.toUpperCase().replaceAll(' ', '')
|
||||||
}
|
}
|
||||||
return formattedName
|
return formattedName
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user