From a43ceb318862182db72fafdeb5fd41ac9176d714 Mon Sep 17 00:00:00 2001 From: Vincent Vandemeulebrouck Date: Sat, 24 Jun 2023 00:44:50 +0200 Subject: [PATCH] Fix: lire depuis un livre --- module/actor/base-actor.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/actor/base-actor.js b/module/actor/base-actor.js index 29e82b7e..8acd2ffc 100644 --- a/module/actor/base-actor.js +++ b/module/actor/base-actor.js @@ -119,7 +119,7 @@ export class RdDBaseActor extends Actor { } listItems(type = undefined) { return (type ? this.itemTypes[type] : this.items); } - filterItems(filter, type = undefined) { return type ? this.itemTypes[type]?.filter(filter) ?? [] : []; } + filterItems(filter, type = undefined) { return (type ? this.itemTypes[type] : this.items)?.filter(filter) ?? []; } findItemLike(idOrName, type) { return this.getItem(idOrName, type) ?? Misc.findFirstLike(idOrName, this.listItems(type), { description: Misc.typeName('Item', type) });