Fix missing DC value in some check context flags#21581
Fix missing DC value in some check context flags#21581CarlosFdez merged 2 commits intofoundryvtt:v13-devfrom
Conversation
|
How long is the list of properties we're seeking to pull? Perhaps a pick would be cleaner? |
|
Looks like picking would work and is indeed cleaner. {
dc: context.dc ? R.pick(context.dc, ["label", "scope", "slug", "value", "visible"]) : null,
}I've looked at a check roll and an attack roll before & after and the flags look the same. The only downside is, that the list of picked properties may need to be updated if the |
|
Hopefully typescript would take care of that. I just prefer to avoid non-multiple of 4 indentation that prettier likes to add in these situations where possible. Its either that or adding a getTraceData() equivalent that uses that and falls back to the dc. If I remember right value is a getter because we want to be able to defer its computation, so we can't simply convert that to a variable. |
|
Yeah, it's probably fine. The |
When
context.dcis aStatisticDifficultyClass, the DC value is a getter and is therefore non-enumerable, causing it to be dropped by theomithelper.Closes #21205