chore: operator precedence of ?? is not what you think (#86)

This commit is contained in:
Patric Stout
2024-05-09 17:26:11 +02:00
committed by GitHub
parent d8af187b7d
commit ab4bca51fc

View File

@@ -64,7 +64,7 @@ const Effect = (props: { effect: ShipSnapshotItemAttributeEffect }) => {
if (item === undefined) {
sourceName = `Unknown ${sourceType}`;
} else {
sourceName = `${sourceType} - ` + eveData.typeIDs?.[item?.type_id]?.name ?? sourceName;
sourceName = `${sourceType} - ` + (eveData.typeIDs?.[item?.type_id]?.name ?? sourceName);
attribute = item?.attributes.get(props.effect.source_attribute_id);
}
}