use first match instead of match array

This commit is contained in:
Abhinav 2023-11-17 18:13:01 +05:30
parent 4c50e920b5
commit 9e710ba549

View file

@ -124,7 +124,7 @@ export const getMetadataJSONMapKeyForJSON = (
-1 * endsWithNumberedSuffixWithBrackets[0].length
);
const [name, extension] = splitFilenameAndExtension(title);
return `${collectionID}-${name}${endsWithNumberedSuffixWithBrackets}.${extension}`;
return `${collectionID}-${name}${endsWithNumberedSuffixWithBrackets[0]}.${extension}`;
}
return `${collectionID}-${title}`;
};