[feat-75] applied PR comments 1

This commit is contained in:
silentrald
2024-09-28 21:38:37 +08:00
parent 6a2f982292
commit 9d4acea654
4 changed files with 47 additions and 62 deletions
@@ -131,7 +131,7 @@ export const LocalMapsListPanel = forwardRef<LocalMapsListPanelRef, Props>(({ ve
const mapsCopy = maps ? [ ...maps ] : [];
// importMap can collide with existing map
const index = maps.findIndex(map => map.songDetails.name === importMap.songDetails.name);
const index = maps.findIndex(map => map.songDetails?.name === importMap.songDetails.name);
if (index > -1) {
mapsCopy.splice(index, 1);
}