mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-06-05 20:34:15 +02:00
Fixed so that Homebrew Item Features without effects don't error out because effects are expected
This commit is contained in:
parent
d73760fc39
commit
41829bc9d5
2 changed files with 5 additions and 4 deletions
|
|
@ -453,7 +453,7 @@ export const allArmorFeatures = () => {
|
|||
const feature = homebrewFeatures[key];
|
||||
const actions = feature.actions.map(action => ({
|
||||
...action,
|
||||
effects: action.effects.map(effect => feature.effects.find(x => x.id === effect._id)),
|
||||
effects: action.effects?.map(effect => feature.effects.find(x => x.id === effect._id))??[],
|
||||
type: action.type
|
||||
}));
|
||||
const actionEffects = actions.flatMap(a => a.effects);
|
||||
|
|
@ -1407,7 +1407,7 @@ export const allWeaponFeatures = () => {
|
|||
|
||||
const actions = feature.actions.map(action => ({
|
||||
...action,
|
||||
effects: action.effects.map(effect => feature.effects.find(x => x.id === effect._id)),
|
||||
effects: action.effects?.map(effect => feature.effects.find(x => x.id === effect._id)) ?? [],
|
||||
type: action.type
|
||||
}));
|
||||
const actionEffects = actions.flatMap(a => a.effects);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue