Properly initialize state of Application
This will otherwise crash with React 16.
This commit is contained in:
parent
842a380766
commit
9fa5c6ab05
2 changed files with 7 additions and 2 deletions
|
|
@ -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) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue