lookingGlass: Handle undefined in objectToString()

Fallout from commit 9d941f8202: Template strings handle undefined
values just fine, the replacement does not. Fix that.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/1020
This commit is contained in:
Florian Müllner 2020-02-19 01:43:23 +01:00
parent cf5204760d
commit ff4623454f

View File

@ -244,7 +244,7 @@ function objectToString(o) {
// special case this since the default is way, way too verbose
return '<js function>';
} else {
return o.toString();
return o !== undefined ? o.toString() : 'undefined';
}
}