foundry-swnr
foundry-swnr copied to clipboard
Demo Charge Crashing Character Sheets
When a character or GM drags in the Demo Charge item into a character sheet, it doesn't appear and the sheet loses the ability to drag any new items.
If closed, the sheet then cannot be re-opened.
The error that appears in the console.
foundry.js:2013 TypeError: Cannot read property 'mod' of undefined
[Detected 1 package: system:swnr]
at SWNRWeapon.<anonymous> (handlebar-helpers.ts:43) at SWNRWeapon.c (handlebars.min.js:27) at eval (eval at createFunctionContext (handlebars.min.js:29), <anonymous>:11:1084) at h (handlebars.min.js:27) at c (handlebars.min.js:27) at Object.<anonymous> (handlebars.min.js:27) at Object.c (handlebars.min.js:27) at Object.eval [as main] (eval at createFunctionContext (handlebars.min.js:29), <anonymous>:159:49) at c (handlebars.min.js:27) at d (handlebars.min.js:27) at e (handlebars.min.js:28) at renderTemplate (foundry.js:3637) at async CharacterActorSheet._renderInner (foundry.js:2220) at async CharacterActorSheet._renderInner (foundry.js:2747) at async CharacterActorSheet._render (foundry.js:2055) at async CharacterActorSheet._render (foundry.js:2736)
I imported the Demo Chargo from the compendium and then dragged it into the character sheet, now functional and not crashing the sheet. I looked into it, and it defaulted to Strength.
My best guess is that the stat: '-'
is what's messing it up, as it doesn't have a "none" value, and instead just giving a null error.
I have a vague idea of how to pin this down.
Probably the best idea is to code in the idea of a weapon that lacks an attack action, but forces a type of saving throw.