Steps to Reproduce
-
Create a playbook
-
Add an item grant type 'Advancement', level 0, no repeat
2a. Add some move items to the item grant
-
Add a second item grant, type 'Advancement', level 1, repeating
3a. Add some move items to the grant, some of which are in the other item grant.
-
Create an actor.
-
Select the created playbook.
-
On the item grant dialog. select one of the moves and choose OK.
-
Advance the actor.
-
On the item grant dialog, select one of the moves and choose OK.
Expected behaviour
On the initial selection, a move is added to the actor
On advancement, a move is added to the actor
Actual behaviour
On the initial selection, a move is added to the actor
On advancement, a selected move is not added to the actor.
The console shows
item.js:425 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'localeCompare')
at _sortItemAdvancement (item.js:425:17)
at Array.sort (<anonymous>)
at item.js:414:49
at Array.forEach (<anonymous>)
at ItemPbta._preUpdate (item.js:412:31)
at #preUpdateDocumentArray (foundry.mjs:58740:39)
at async ClientDatabaseBackend._updateDocuments (foundry.mjs:58692:5)
Added a zip of a compendium with a playbook that exhibits the problem.
testadvancement.zip
Steps to Reproduce
Create a playbook
Add an item grant type 'Advancement', level 0, no repeat
2a. Add some move items to the item grant
Add a second item grant, type 'Advancement', level 1, repeating
3a. Add some move items to the grant, some of which are in the other item grant.
Create an actor.
Select the created playbook.
On the item grant dialog. select one of the moves and choose OK.
Advance the actor.
On the item grant dialog, select one of the moves and choose OK.
Expected behaviour
On the initial selection, a move is added to the actor
On advancement, a move is added to the actor
Actual behaviour
On the initial selection, a move is added to the actor
On advancement, a selected move is not added to the actor.
The console shows
Added a zip of a compendium with a playbook that exhibits the problem.
testadvancement.zip