Fix issue #35: Dragonroll frontend: item modifications
All checks were successful
Test / test (push) Successful in 2s
All checks were successful
Test / test (push) Successful in 2s
This commit is contained in:
@@ -109,6 +109,9 @@ async function saveFoundryItem(campaign, source, fullSync = false) {
|
||||
|
||||
item.foundryItemId = foundryItemId;
|
||||
if (!fullSync || item.isNew) Object.assign(item, fields);
|
||||
// Foundry's own icon is kept on every save, not only when the edits above
|
||||
// land: the item window offers it back after the user picked their own.
|
||||
if (fields.image) item.foundryImage = fields.image;
|
||||
if (!item.foundryNames.includes(fields.name)) {
|
||||
item.foundryNames = [...item.foundryNames, fields.name].slice(-MAX_FOUNDRY_NAMES);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user