Prevent possible TypeError
This commit is contained in:
@@ -290,7 +290,7 @@ const commitMigratedMetadata = (
|
|||||||
|
|
||||||
useEffectFn(() => {
|
useEffectFn(() => {
|
||||||
(async () => {
|
(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);
|
const commitMigration = !commitedMigrations.has(itemMigrationKey);
|
||||||
if (!commitMigration) {
|
if (!commitMigration) {
|
||||||
|
|||||||
Reference in New Issue
Block a user