fix getRenamedExportedCollections

This commit is contained in:
Abhinav 2023-05-05 14:48:34 +05:30
parent 326f98a03a
commit 858b10648d

View file

@ -55,11 +55,14 @@ export const getRenamedExportedCollections = (
const currentExportName = collectionIDExportNameMap.get(
collection.id
);
if (currentExportName === collection.name) {
return false;
}
const hasNumberedSuffix = currentExportName.match(/\(\d+\)$/);
const currentExportNameWithoutNumberedSuffix = hasNumberedSuffix
? currentExportName.replace(/\(\d+\)$/, '')
: currentExportName;
return collection.name !== currentExportNameWithoutNumberedSuffix;
}
return false;