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