mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-17 23:49:02 +01:00
Fixed tooltip enrichment
This commit is contained in:
parent
a5b656f533
commit
6f9a249868
11 changed files with 70 additions and 25 deletions
|
|
@ -252,9 +252,18 @@ export function addLinkedItemsDiff(changedItems, currentItems, options) {
|
|||
if (changedItems) {
|
||||
const prevItems = new Set(currentItems);
|
||||
const newItems = new Set(changedItems);
|
||||
options.toLink = Array.from(newItems.difference(prevItems).map(item => item?.item ?? item));
|
||||
options.toLink = Array.from(
|
||||
newItems
|
||||
.difference(prevItems)
|
||||
.map(item => item?.item ?? item)
|
||||
.filter(x => (typeof x === 'object' ? x.item : x))
|
||||
);
|
||||
|
||||
options.toUnlink = Array.from(
|
||||
prevItems.difference(newItems).map(item => item?.item?.uuid ?? item?.uuid ?? item)
|
||||
prevItems
|
||||
.difference(newItems)
|
||||
.map(item => item?.item?.uuid ?? item?.uuid ?? item)
|
||||
.filter(x => (typeof x === 'object' ? x.item : x))
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue