From 56bd82c6fce2bce285baeec700a1eb3ecee2c7c6 Mon Sep 17 00:00:00 2001 From: wolfbeast Date: Wed, 28 Jun 2017 10:10:53 +0200 Subject: Devtools gcli commands - fix the help. --- devtools/shared/gcli/source/lib/gcli/commands/commands.js | 6 +++--- devtools/shared/gcli/source/lib/gcli/commands/help.js | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'devtools/shared/gcli/source/lib') diff --git a/devtools/shared/gcli/source/lib/gcli/commands/commands.js b/devtools/shared/gcli/source/lib/gcli/commands/commands.js index 67793b2dc..0af4be620 100644 --- a/devtools/shared/gcli/source/lib/gcli/commands/commands.js +++ b/devtools/shared/gcli/source/lib/gcli/commands/commands.js @@ -335,10 +335,10 @@ Parameter.prototype.toJson = function() { }; // Values do not need to be serializable, so we don't try. For the client - // side (which doesn't do any executing) we don't actually care what the - // default value is, just that it exists + // side (which doesn't do any executing) we only care whether default value is + // undefined, null, or something else. if (this.paramSpec.defaultValue !== undefined) { - json.defaultValue = {}; + json.defaultValue = (this.paramSpec.defaultValue === null) ? null : {}; } if (this.paramSpec.description != null) { json.description = this.paramSpec.description; diff --git a/devtools/shared/gcli/source/lib/gcli/commands/help.js b/devtools/shared/gcli/source/lib/gcli/commands/help.js index 317f80240..7d1cc9087 100644 --- a/devtools/shared/gcli/source/lib/gcli/commands/help.js +++ b/devtools/shared/gcli/source/lib/gcli/commands/help.js @@ -69,7 +69,7 @@ function getHelpManData(commandData, context) { } else { // We need defaultText to work the text version of defaultValue - input = l10n.lookupFormat('helpManOptional'); + input = l10n.lookup('helpManOptional'); /* var val = param.type.stringify(param.defaultValue); input = Promise.resolve(val).then(function(defaultValue) { -- cgit v1.2.3