OctarineSourcerer / cyberpunk2020

A FoundryVTT system for Cyberpunk 2020. It's playable now! There's a lot of hole, because there's a LOT of system to cover, but it should be mostly usable <3
24 stars 22 forks source link

Character sheet unable to be opened if skill searched for #111

Open OctarineSourcerer opened 2 years ago

OctarineSourcerer commented 2 years ago

So the search gets saved with the sheet and gives the following:

foundry.js:2013 TypeError: An error occurred while rendering CyberpunkActorSheet 52: Cannot read property 'name' of undefined
    at actor-sheet.js:83
    at Array.filter (<anonymous>)
    at CyberpunkActorSheet._filterSkills (actor-sheet.js:82)
    at CyberpunkActorSheet._prepareSkills (actor-sheet.js:57)
    at CyberpunkActorSheet.getData (actor-sheet.js:47)
    at CyberpunkActorSheet._render (foundry.js:2049)
    at CyberpunkActorSheet._render (foundry.js:2736)
    at CyberpunkActorSheet.render (foundry.js:2011)
    at CyberpunkActorSheet.render (foundry.js:3231)
    at CyberpunkActor.render (foundry.js:9461)

Removing that saved search string allows the sheet to be opened again.

I can't reproduce this on my end currently, though I suspect it has something to do with skills being possibly changed since the sortedSkills array was updated. Should be able to sort this with faulty sheet provided.