loginManager: Fix canRebootToBootLoaderMenu() result

Since commit a3db909383, the `result` variable holds the
destructured result of the D-Bus call, not the results array
as previously.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2472>
This commit is contained in:
Florian Müllner 2022-09-06 16:37:25 +02:00 committed by Marge Bot
parent 9d690b0beb
commit 17a2726e64

View File

@ -164,8 +164,8 @@ var LoginManagerSystemd = class extends Signals.EventEmitter {
try {
const [result] = await this._proxy.CanRebootToBootLoaderMenuAsync();
needsAuth = result[0] === 'challenge';
canRebootToBootLoaderMenu = needsAuth || result[0] === 'yes';
needsAuth = result === 'challenge';
canRebootToBootLoaderMenu = needsAuth || result === 'yes';
} catch (error) {
canRebootToBootLoaderMenu = false;
needsAuth = false;