gnome-shell/js
Will Thompson 0892b5dcdb
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.
2018-09-25 21:28:35 +01:00
..
extensionPrefs dbus: Move all interface descriptions into the resource 2018-09-17 07:34:49 +00:00
gdm dbus: Move all interface descriptions into the resource 2018-09-17 07:34:49 +00:00
misc inputMethod: Add a null-check for text in vfunc_set_surrounding. 2018-09-17 16:06:19 +00:00
perf scripting: Fix argument list of createTestWindow() 2018-04-25 23:47:06 +02:00
portalHelper dbus: Move all interface descriptions into the resource 2018-09-17 07:34:49 +00:00
ui endSessionDialog: squash "reference to undefined property" warning 2018-09-25 21:28:35 +01:00
js-resources.gresource.xml build: Use dedicated resources for helper programs 2018-08-14 17:28:04 +00:00
meson.build build: Use dedicated resources for helper programs 2018-08-14 17:28:04 +00:00
portal-resources.gresource.xml dbus: Move all interface descriptions into the resource 2018-09-17 07:34:49 +00:00
prefs-resources.gresource.xml build: Use dedicated resources for helper programs 2018-08-14 17:28:04 +00:00