Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

issue6056: add a message when trying to display aliases but none is d…

…efined
  • Loading branch information...
commit 44236171254f0ca1eefe3e792e0d545aa6b0fa5b 1 parent 4811a4a
@fflorent authored
View
9 extension/content/firebug/console/commandLineInclude.js
@@ -96,6 +96,13 @@ var CommandLineIncludeRep = domplate(FirebugReps.Table,
var store = CommandLineInclude.getStore();
var keys = store.getKeys();
var arrayToDisplay = [];
+ var returnValue = Firebug.Console.getDefaultReturnValue(context.window);
+
+ if (keys.length === 0)
+ {
+ CommandLineInclude.log("noAliasDefined", [], [context, "error"]);
+ return returnValue;
+ }
for (var i=0; i<keys.length; i++)
{
@@ -108,7 +115,7 @@ var CommandLineIncludeRep = domplate(FirebugReps.Table,
var input = new CommandLineIncludeObject();
this.log(arrayToDisplay, ["alias", "URL"], context, input);
- return Firebug.Console.getDefaultReturnValue(context.window);
+ return returnValue;
},
deleteAlias: function(aliasName, ev)
View
3  extension/locale/en-US/firebug.properties
@@ -815,6 +815,9 @@ commandline.include.wrongUrlArgument=Wrong url argument; expected string or null
# %S = the name of the alias to delete
commandline.include.confirmDelete=Do you really want to delete this alias : "%S" ?
+# LOCALIZATION NOTE (commandline.include.noAliasDefined): For the include() function. This message is displayed
+# when the user wants to display the aliases table but there is no alias defined.
+commandline.include.noAliasDefined=No alias has been defined yet.
commandline.tip.Delete_Alias=Delete the alias
commandline.tip.Edit_Alias_Name=Edit the name of the alias

2 comments on commit 4423617

@simonlindholm

I don't think this should be an error; rather a log or something (maybe in italic, like console.log(); or console.log(""); do).

@fflorent
Owner
Please sign in to comment.
Something went wrong with that request. Please try again.