lookingGlass: Also handle null objects in objectToString
Whoops, while ff4623454
fixed the handling of `undefined` objects,
`null` objects obviously still don't have a toString() method. So also
handle those and return 'null' in case the object is null.
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/1024
This commit is contained in:
parent
ff4623454f
commit
26a49168ba
@ -244,7 +244,13 @@ function objectToString(o) {
|
||||
// special case this since the default is way, way too verbose
|
||||
return '<js function>';
|
||||
} else {
|
||||
return o !== undefined ? o.toString() : 'undefined';
|
||||
if (o === undefined)
|
||||
return 'undefined';
|
||||
|
||||
if (o === null)
|
||||
return 'null';
|
||||
|
||||
return o.toString();
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user