Prevent possible TypeError
This commit is contained in:
@@ -290,7 +290,7 @@ const commitMigratedMetadata = (
|
||||
|
||||
useEffectFn(() => {
|
||||
(async () => {
|
||||
const itemMigrationKey = `${type}_${type === 'global' ? '' : (metadataHolder as { id: any }).id}`;
|
||||
const itemMigrationKey = `${type}_${type === 'global' ? '' : (metadataHolder as { id: any } | undefined)?.id}`;
|
||||
|
||||
const commitMigration = !commitedMigrations.has(itemMigrationKey);
|
||||
if (!commitMigration) {
|
||||
|
||||
Reference in New Issue
Block a user