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:
Tom Butcher 2026-09-02 21:41:29 +01:00
parent b6834fecc6
commit 444e694593

View File

@ -194,7 +194,7 @@ export function getModelByName(name, ignoreCase = false) {
export function getModelByPluralName(pluralName, ignoreCase = false) {
function formatName(formattedName) {
if (ignoreCase == true) {
formattedName = formattedName.toUpperCase().replace(' ', '')
formattedName = formattedName.toUpperCase().replaceAll(' ', '')
}
return formattedName
}