Properly initialize state of Application

This will otherwise crash with React 16.
This commit is contained in:
Martin Pitt 2018-08-29 00:15:25 +02:00 committed by Lars Karlitski
parent 842a380766
commit 9fa5c6ab05
2 changed files with 7 additions and 2 deletions

View file

@ -26,6 +26,7 @@ const _ = cockpit.gettext;
export class Application extends React.Component {
constructor() {
super();
this.state = { 'hostname': _("Unknown") };
cockpit.file('/etc/hostname').read()
.done((content) => {