gnome-shell/js
Will Thompson 36f9dcd2bd endSessionDialog: squash "reference to undefined property" warning
dialogContent is set to one of the elements of the list DialogContent,
but not all of those have a checkBoxText property. When logging out (as
opposed to shutting down), this causes a warning:

    JS WARNING: [resource:///org/gnome/shell/ui/endSessionDialog.js
    763]: reference to undefined property "checkBoxText"

(The line number corresponds to this line in 3.28.3.)

The warning is apparently not triggered if the undefined property is
used as part of a boolean expression:

    gjs> var x = {};
    gjs> x.a;
    typein:2:1 strict warning: reference to undefined property "a"
    gjs> if (x.b) { log('oh no'); }
    gjs> x.c || ''
    ""
_setCheckBoxLabel() just checks the truthiness of its 'text' argument,
and the empty string is false-y, so passing '' rather than undefined has
no functional effect.

(cherry picked from commit 0892b5dcdb)
2019-01-11 11:30:26 +00:00
..
extensionPrefs cleanup: Use Function.prototype.bind() 2018-02-21 13:55:02 +00:00
gdm gdm, util: Always allow to retry login in unlock mode 2018-07-25 20:38:58 +00:00
misc objectManager: correct other invalid index code in onNameVanished 2018-09-04 01:11:40 +02:00
perf cleanup: Use arrow notation for anonymous functions 2018-02-21 13:55:00 +00:00
portalHelper cleanup: Use Function.prototype.bind() 2018-02-21 13:55:02 +00:00
ui endSessionDialog: squash "reference to undefined property" warning 2019-01-11 11:30:26 +00:00
js-resources.gresource.xml thunderbolt: add policy provider and indicator 2018-02-05 21:38:49 +01:00
meson.build build: Support the meson build system 2017-07-20 00:20:54 +02:00