Commit 186c0d9c authored by Feng Xue's avatar Feng Xue
Browse files

change dot notation to square bracket to fit clojure's advance optimization

parent 57d1cacf
/*global Promise, XMLHttpRequest */ /*global Promise, XMLHttpRequest */
/*jshint -W069 */
function CommandExecutor() { function CommandExecutor() {
"use strict"; "use strict";
...@@ -173,6 +174,8 @@ function CommandExecutor() { ...@@ -173,6 +174,8 @@ function CommandExecutor() {
} }
}, },
helpCommands = Object.keys(helpTexts),
req = new XMLHttpRequest(), req = new XMLHttpRequest(),
ajaxPostPromise = function (postData, url) { ajaxPostPromise = function (postData, url) {
...@@ -195,10 +198,9 @@ function CommandExecutor() { ...@@ -195,10 +198,9 @@ function CommandExecutor() {
}); });
}; };
var helpCommands = Object.keys(helpTexts);
helpCommands.sort(); helpCommands.sort();
helpCommands.forEach(function (helpCommand) { helpCommands.forEach(function (helpCommand) {
helpTexts.help.description += " " + helpCommand; helpTexts["help"].description += " " + helpCommand;
}); });
return { return {
......
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