diff --git a/src/components/views/settings/DevicesPanel.tsx b/src/components/views/settings/DevicesPanel.tsx index 5e297bbea6..9a1321619e 100644 --- a/src/components/views/settings/DevicesPanel.tsx +++ b/src/components/views/settings/DevicesPanel.tsx @@ -35,7 +35,7 @@ interface IProps { interface IState { devices: IMyDevice[]; deviceLoadError?: string; - selectedDevices?: string[]; + selectedDevices: string[]; deleting?: boolean; } @@ -43,6 +43,14 @@ interface IState { export default class DevicesPanel extends React.Component { private unmounted = false; + constructor(props: IProps) { + super(props); + this.state = { + devices: [], + selectedDevices: [], + }; + } + public componentDidMount(): void { this.loadDevices(); }