Cannot edit gems in a character's gem bag
I created a new gem directly on my character sheet, in the gem bag. When I try and right-click to edit it, nothing happens and I get the following error in the browser's console.
GemBagSD.mjs:97 Uncaught TypeError: Cannot read properties of undefined (reading 'actor')
at canEdit (GemBagSD.mjs:97:19)
at Object.condition (GemBagSD.mjs:109:27)
at ContextMenu.render (foundry.js:64818:67)
at HTMLFormElement.<anonymous> (foundry.js:64742:19)
Found this on Foundry 11.313 and Shadowdark RPG 1.7.3
Can you right click on the affected character, then export data. Then upload that JSON file. We'll take a look.
Right-clicking to edit other items on the sheet work fine. It's just gems in the bag. fvtt-Actor-ethel-lochlainn-z9FnuhnEIqT9fENR.json
The character and gem load and work perfectly for me. It's probably a mod you're running that's causing the error. Try loading your character into a new blank world and see if the issue persists. Here's a copy of the character with the gem removed: fvtt-Actor-ethel-lochlainn-gem-removed.json
@kaelad02 Did you get this figured out? Can this be closed out?
I'm not the GM in the game and I didn't get a chance to ask the GM to try turning modules off before our session ended. I setup a test world and couldn't reproduce the bug either. None of their modules jumped out as a possible culprit either. Let's close it for now. If I get a chance to debug it more and find out it is a system bug, I'll reopen it.
My GM updated the Shadowdark system to version 3.0.0 and we were admiring the new sheet layout. I brought up this error again and it was still reproducible by me and another player but not the GM. I suspect there's some difference between GM vs Player. I asked the GM and he said he gave us the Trusted Player role, in case that matters.
And on the off-chance the line numbers have changed, here's the stack trace I saw with version 3.0.0:
TypeError: Cannot read properties of undefined (reading 'actor')
at canEdit (GemBagSD.mjs:108:19)
at Object.condition (GemBagSD.mjs:120:27)
at ContextMenu.render (foundry.js:64818:67)
at HTMLFormElement.<anonymous> (foundry.js:64742:19)