diff --git a/changelog.md b/changelog.md index ebc32dd..994ecc2 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,8 @@ # Rest Recovery Changelog +## Version 1.11.4 +- Fixed bug when trying to prompt rest with non-actor tokens on the scene + ## Version 1.11.3 - Fixed NPC rests when using Tidy (only from their sheet - still don't support adding them in a prompted rest) - Due to improvements made to NPC actor data in dnd5e v3.2.0, NPCs should now mostly be able to benefit from the full Rest Recovery workflow; in dnd5e v3.1.x, however, NPC rests will simply use the core rest methods diff --git a/module.json b/module.json index 0750a45..4779597 100644 --- a/module.json +++ b/module.json @@ -2,7 +2,7 @@ "id": "rest-recovery", "title": "Rest Recovery for 5E", "description": "Adds 5e long and short rest mechanics and variant rules, such as feats, class features, and hit-dice healing.", - "version": "1.11.3", + "version": "1.11.4", "authors": [ { "name": "Wasp", diff --git a/scripts/formapplications/prompt-rest/prompt-rest-shell.svelte b/scripts/formapplications/prompt-rest/prompt-rest-shell.svelte index 07adc73..d940fe2 100644 --- a/scripts/formapplications/prompt-rest/prompt-rest-shell.svelte +++ b/scripts/formapplications/prompt-rest/prompt-rest-shell.svelte @@ -16,7 +16,7 @@ let form; - const priorityActors = Array.from(game.scenes.get(game.user.viewedScene)?.tokens?.values()).map(currToken => currToken?.actor) ?? []; + const priorityActors = Array.from(game.scenes.get(game.user.viewedScene)?.tokens?.values()).map(currToken => currToken?.actor).filter(currActor => !!currActor) ?? []; const otherActors = Array.from(game.actors).filter(dirActor => !priorityActors.map(priActor => priActor.id).includes(dirActor.id)); const validActors = [...priorityActors, ...otherActors].reduce((acc, actor) => {