mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-17 23:49:02 +01:00
remove unecessary try catch
This commit is contained in:
parent
745e68b4e2
commit
4692596f73
2 changed files with 47 additions and 40 deletions
|
|
@ -62,20 +62,12 @@ export default class WeaponSheet extends DHBaseItemSheet {
|
|||
const attachedUUIDs = this.document.system.attached || [];
|
||||
context.attachedItems = await Promise.all(
|
||||
attachedUUIDs.map(async uuid => {
|
||||
try {
|
||||
const item = await fromUuid(uuid);
|
||||
return {
|
||||
uuid: uuid,
|
||||
name: item?.name || 'Unknown Item',
|
||||
img: item?.img || 'icons/svg/item-bag.svg'
|
||||
};
|
||||
} catch (error) {
|
||||
return {
|
||||
uuid: uuid,
|
||||
name: 'Unknown Item',
|
||||
img: 'icons/svg/item-bag.svg'
|
||||
};
|
||||
}
|
||||
const item = await fromUuid(uuid);
|
||||
return {
|
||||
uuid: uuid,
|
||||
name: item?.name || 'Unknown Item',
|
||||
img: item?.img || 'icons/svg/item-bag.svg'
|
||||
};
|
||||
})
|
||||
);
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue