Commit 57d1cacf authored by Eirik Alvær's avatar Eirik Alvær
Browse files

fixes errors

parent 3995f200
......@@ -195,13 +195,11 @@ function CommandExecutor() {
});
};
function addHelpCommands(helpText) {
var helpCommands = helpTexts.keys();
helpCommands.sort();
helpCommands.forEach(function (helpCommand) {
helpText.description += " " + helpCommand;
});
}
var helpCommands = Object.keys(helpTexts);
helpCommands.sort();
helpCommands.forEach(function (helpCommand) {
helpTexts.help.description += " " + helpCommand;
});
return {
//Eww! This method should not be exported, but it has to be done to
......@@ -221,10 +219,7 @@ function CommandExecutor() {
switch (parserObject.type) {
case "help":
helpText = helpTexts[parserObject.helpTopic];
if (parserObject.helpTopic === "help") {
addHelpCommands(helpText);
}
helpText = helpTexts[parserObject.helpTopic || "help"];
intermediateResult = new Promise(function (resolve) {
resolve(helpText ?
{result: helpText} :
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment