Handle erroring action update differently

This commit is contained in:
Carlos Fernandez 2026-07-18 20:41:04 -04:00
parent 7e5e722c5f
commit e42d5ae4b3
2 changed files with 3 additions and 3 deletions

View file

@ -237,8 +237,8 @@ export function ActionMixin(Base) {
await this.parent.updateSource({ [path]: updates }, options);
result = this.parent;
} else {
// If no changes occur, update returns undefined, but we need to re-retrieve the action anyways
result = (await this.item.update({ [path]: updates }, options)) ?? this.item;
result = await this.item.update({ [path]: updates }, options);
if (!result) return result;
}
return this.inCollection