Commit cba2861e authored by Kjetil Thuen's avatar Kjetil Thuen
Browse files

Yet another Google Clojure problem workaround

parent 937bf2ea
...@@ -324,29 +324,29 @@ function CommandExecutor() { ...@@ -324,29 +324,29 @@ function CommandExecutor() {
timeBeforeExecute = (new Date()).getTime(); timeBeforeExecute = (new Date()).getTime();
switch (parserObject.type) { switch (parserObject.type) {
case "help": case "help":
helpText = helpTexts[parserObject.helpTopic || "help"]; helpText = helpTexts[parserObject.helpTopic || "help"];
intermediateResult = new Promise(function (resolve) { intermediateResult = new Promise(function (resolve) {
resolve(helpText ? resolve(helpText ?
{ {
result: helpText, result: helpText,
"runTimeMillis": (new Date()).getTime() - timeBeforeExecute || 1 "runTimeMillis": (new Date()).getTime() - timeBeforeExecute || 1
} : } :
{error: { type: "NO_RESULT", message: "Got no result"}} {error: { type: "NO_RESULT", message: "Got no result"}}
); );
}); });
break; break;
case "history": case "history":
intermediateResult = new Promise(function (resolve) { intermediateResult = new Promise(function (resolve) {
resolve({result: "history"}); resolve({result: "history"});
}); });
break; break;
default: default:
if (sessionId) { if (sessionId) {
parserObject.sessionId = sessionId; parserObject["sessionId"] = sessionId;
} }
intermediateResult = this.requestControllerResult(parserObject, controllerUrl); intermediateResult = this.requestControllerResult(parserObject, controllerUrl);
break; break;
} }
/*jslint sub: true */ /*jslint sub: true */
......
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