Carpathias / tgce-restyler-5e3

Restyler for DnD5e 3.0
Other
4 stars 0 forks source link

Red error in console #5

Closed Talanor closed 4 months ago

Talanor commented 5 months ago

Hello, the module works fine so I'm not sure what's causing this or what the impact is, but I get this error in the console every so often:

foundry.js:753 TypeError: Error thrown in hooked function '' for hook 'ready'. Cannot read properties of null (reading 'includes')
    at tgce-restyler-5e3.js:342:75
    at Array.find (<anonymous>)
    at applyStyleSettings (tgce-restyler-5e3.js:342:56)
    at Object.fn (tgce-restyler-5e3.js:222:5)
    at #call (foundry.js:730:20)
    at Hooks.callAll (foundry.js:687:17)
    at Game.setupGame (foundry.js:8746:11)
    at async Game._initializeGameView (foundry.js:9990:5)
    at async Game.initialize (foundry.js:8650:5)
Carpathias commented 5 months ago

Thanks for bringing this to my attention!

Touched base with Talanor in Discord and provided link to the Restyler troubleshooting thread. I believe the error is caused by the code not accommodating a stylesheet with a null HREF value. If so, this issue will be addressed with the release of V2 which handles this scenario properly.

Carpathias commented 4 months ago

v2.0.01 has been released. Please update and check logs.