Oops, fix crash saving untitled outfits
This commit is contained in:
parent
5ac758cc72
commit
f504808e12
1 changed files with 4 additions and 1 deletions
|
@ -137,7 +137,10 @@ const resolvers = {
|
|||
|
||||
// Get the base name of the provided name: trim it, and strip any "(1)"
|
||||
// suffixes.
|
||||
const baseName = rawName.replace(/\s*\([0-9]+\)\s*$/, "");
|
||||
const baseName = (rawName || "Untitled outfit").replace(
|
||||
/\s*\([0-9]+\)\s*$/,
|
||||
""
|
||||
);
|
||||
const namePlaceholder = baseName.trim().replace(/_%/g, "\\$0") + "%";
|
||||
|
||||
// Then, look for outfits from this user with the same base name.
|
||||
|
|
Loading…
Reference in a new issue