Skip to content

Commit

Permalink
fix(Dilithium Stress): Fixes an issue where dilithium stress doesn't …
Browse files Browse the repository at this point in the history
…appear on the status card. Closes #3089
  • Loading branch information
alexanderson1993 committed Feb 8, 2021
1 parent d248c58 commit c28a5a1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion server/classes/sensors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ export default class Sensors extends System {
this.name = params.name;
}
this.pings = params.pings ?? true;
this.pingMode = params.pingMode || "manual";
this.pingMode = params.pingMode || "active";
this.timeSincePing = params.timeSincePing || 0;
this.scanResults = params.scanResults || "";
this.scanRequest = params.scanRequest || "";
Expand Down
4 changes: 3 additions & 1 deletion src/components/views/Status/components/dilithiumStress.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ class DilithiumStress extends Component {
this.props.simulator.stations,
);
if (!dilithiumStressCard) return null;
const reactor = this.props.data.reactors && this.props.data.reactors[0];
const reactor =
this.props.data.reactors &&
this.props.data.reactors.find(r => r.model === "reactor");
if (!reactor) return null;
const stressLevel = this.calcStressLevel(reactor) / 100;
return (
Expand Down

0 comments on commit c28a5a1

Please sign in to comment.