[shellDBus] Avoid sending undefined over DBus
DBus doesn't have a notion of null/undefined, so do the lame thing and return the empty string.
This commit is contained in:
parent
48f8e4943d
commit
7c796b2d2a
@ -48,6 +48,9 @@ GnomeShell.prototype = {
|
|||||||
let success;
|
let success;
|
||||||
try {
|
try {
|
||||||
returnValue = JSON.stringify(eval(code));
|
returnValue = JSON.stringify(eval(code));
|
||||||
|
// A hack; DBus doesn't have null/undefined
|
||||||
|
if (returnValue == undefined)
|
||||||
|
returnValue = "";
|
||||||
success = true;
|
success = true;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
returnValue = JSON.stringify(e);
|
returnValue = JSON.stringify(e);
|
||||||
|
Loading…
Reference in New Issue
Block a user