shellDBus: Fix Eval() return value when disabled

Eval() is expected to return a boolean success value and a string result.
However when the function is disabled (via the development-tools setting),
we return null for the latter which is not a valid string value.
Return an empty string instead.

https://bugzilla.gnome.org/show_bug.cgi?id=698959
This commit is contained in:
Florian Müllner 2013-04-26 15:17:11 +02:00
parent 77d21e53d0
commit 9f00be50d6

View File

@ -97,7 +97,7 @@ const GnomeShell = new Lang.Class({
*/ */
Eval: function(code) { Eval: function(code) {
if (!global.settings.get_boolean('development-tools')) if (!global.settings.get_boolean('development-tools'))
return [false, null]; return [false, ''];
let returnValue; let returnValue;
let success; let success;