message: fix crash on subclass item popup
diff: @@ -24,6 +24,12 @@ export const energyStyles = {
  [DestinyEnergyType.Void]: styles.void,
  };
  +const swappableEnergyTypes = [
  + DestinyEnergyType.Arc,
  + DestinyEnergyType.Thermal,
  + DestinyEnergyType.Void,
  +];
  +
  export default function EnergyMeter({
  defs,
  item,
  @@ -117,11 +123,7 @@ export default function EnergyMeter({
  const energyTypes = Object.values(defs.EnergyType.getAll());
  - const energyOptions: Option<DestinyEnergyType>[] = [
  - DestinyEnergyType.Arc,
  - DestinyEnergyType.Thermal,
  - DestinyEnergyType.Void,
  - ].map((e) => {
  + const energyOptions: Option<DestinyEnergyType>[] = swappableEnergyTypes.map((e) => {
  const energyDef = energyTypes.find((ed) => ed.enumValue === e)!;
  return {
  key: e.toString(),
  @@ -146,6 +148,7 @@ export default function EnergyMeter({
  </div>
  </div>
  <div className={clsx(styles.inner, energyStyles[previewEnergyType])}>
  + {swappableEnergyTypes.includes(item.energy.energyType) && (
  <Select<DestinyEnergyType>
  options={energyOptions}
  value={previewEnergyType}
  @@ -155,6 +158,7 @@ export default function EnergyMeter({
  >
  <ElementIcon className={styles.icon} element={energyTypeDef} />
  </Select>
  + )}
  {meterIncrements.map((incrementStyle, i) => (
  <div
  key={i}
  @@ -213,7 +217,7 @@ function EnergyUpgradePreview({
  previewCapacity: number;
  previewEnergyType: DestinyEnergyType;
  }) {
  - if (!item.energy) {
  + if (!item.energy || !swappableEnergyTypes.includes(item.energy.energyType)) {
  return null;
  }
  