Skip to content

Commit

Permalink
Address two Sentry UI issues
Browse files Browse the repository at this point in the history
.. they can happen for bridges/devices that do not have been started.
  • Loading branch information
Apollon77 committed Dec 20, 2024
1 parent 9b68b83 commit 402c6cc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src-admin/src/Tabs/Bridges.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -956,9 +956,9 @@ export class Bridges extends BridgesAndDevices<BridgesProps, BridgesState> {
devicesInBridge={this.props.matter.bridges[this.state.addDeviceDialog.bridgeIndex].list.length}
checkAddedDevices={
this.props.nodeStates[this.props.matter.bridges[this.state.addDeviceDialog.bridgeIndex].uuid]
.status === 'waitingForCommissioning'
? MAX_UN_COMMISSIONED_DEVICES
: 0
?.status !== 'waitingForCommissioning'
? 0
: MAX_UN_COMMISSIONED_DEVICES
}
matter={this.props.matter}
socket={this.props.socket}
Expand Down
5 changes: 3 additions & 2 deletions src-admin/src/Tabs/BridgesAndDevices.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -713,8 +713,9 @@ class BridgesAndDevices<TProps extends BridgesAndDevicesProps, TState extends Br
'All information of this device or bridge will be deleted and you must reconnect (with PIN or QR code) again.',
)}
</p>
{this.props.nodeStates[this.state.showResetDialog.bridgeOrDevice.uuid].status !==
'waitingForCommissioning' ? (
{this.props.nodeStates[this.state.showResetDialog.bridgeOrDevice.uuid] &&
this.props.nodeStates[this.state.showResetDialog.bridgeOrDevice.uuid].status !==
'waitingForCommissioning' ? (
<p style={{ color: this.props.themeType === 'dark' ? '#9c0a0a' : '#910000' }}>
{I18n.t(
'This device/bridge is linked to some ecosystem. If it is deleted here, you must manually remove it from your ecosystem!',
Expand Down

0 comments on commit 402c6cc

Please sign in to comment.