diff --git a/src/module/actor/sheets/actor-sheet.ts b/src/module/actor/sheets/actor-sheet.ts index 4ab9e445..9ad9974d 100644 --- a/src/module/actor/sheets/actor-sheet.ts +++ b/src/module/actor/sheets/actor-sheet.ts @@ -224,9 +224,13 @@ export class DS4ActorSheet extends ActorSheet> { /** @override */ protected async _onDropItem( event: DragEvent, - data: { type: "Item" } & (DeepPartial> | { pack: string } | { id: string }), + data: { type: "Item" } & ( + | { data: DeepPartial> } + | { pack: string } + | { id: string } + ), ): Promise> { - const item = ((await Item.fromDropData(data)) as unknown) as DS4Item; + const item = await DS4Item.fromDropData(data); if (item && !this.actor.canOwnItemType(item.data.type)) { ui.notifications?.warn( game.i18n.format("DS4.WarningActorCannotOwnItem", { diff --git a/yarn.lock b/yarn.lock index b1474669..4dba57af 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3596,7 +3596,7 @@ __metadata: "foundry-vtt-types@github:League-of-Foundry-Developers/foundry-vtt-types#foundry-0.7.9": version: 0.1.0 - resolution: "foundry-vtt-types@https://github.com/League-of-Foundry-Developers/foundry-vtt-types.git#commit=095cba6c567b86b11e61fdf6c96892949e5d5ad1" + resolution: "foundry-vtt-types@https://github.com/League-of-Foundry-Developers/foundry-vtt-types.git#commit=de66d24eb891c97923db47eb1a819eec2a298f02" dependencies: "@types/howler": 2.2.1 "@types/jquery": 3.5.1 @@ -3605,7 +3605,7 @@ __metadata: pixi.js: 5.3.4 tinymce: 5.6.2 typescript: ^4.1.4 - checksum: f88c3d3383984eec266c47d7c5f72ad97493921dfb23cbe83d67e5c95583b90d6c4924b7961136f2030aa3493c7710d04d0147f90d75cfb5e663f12c3c2b5d09 + checksum: fb6065ce7ed2c969ee421abd3d259f264ed707fabfce01f27d59707338a9ca6854233c0cb8b91ef2310af22a7f7ee95b3e5080d0d2c6662e9b31ed3a5d10ba17 languageName: node linkType: hard