diff --git a/js/misc/systemActions.js b/js/misc/systemActions.js index b43f93a3d..6d0e0497c 100644 --- a/js/misc/systemActions.js +++ b/js/misc/systemActions.js @@ -331,10 +331,7 @@ const SystemActions = GObject.registerClass({ _updateHaveShutdown() { this._session.CanShutdownRemote((result, error) => { - if (error) - return; - - this._canHavePowerOff = result[0]; + this._canHavePowerOff = error ? false : result[0]; this._updatePowerOff(); }); }