Prevent possible TypeError

This commit is contained in:
schroda
2025-01-11 03:13:38 +01:00
parent 07aeb53fa1
commit 338fb96de3

View File

@@ -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) {