[gnome-shell] lookingGlass: Handle undefined in objectToString()
- From: verdre <jonasd src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] lookingGlass: Handle undefined in objectToString()
- Date: Wed, 19 Feb 2020 10:45:02 +0000 (UTC)
commit ff4623454f3929994ab3911c138f01cf02f723d5
Author: Florian Müllner <fmuellner gnome org>
Date: Wed Feb 19 01:43:23 2020 +0100
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
js/ui/lookingGlass.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/js/ui/lookingGlass.js b/js/ui/lookingGlass.js
index d101591efa..54e3e48581 100644
--- a/js/ui/lookingGlass.js
+++ b/js/ui/lookingGlass.js
@@ -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';
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]