mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-05-05 14:47:12 -04:00
utils/Abiword: use jshint
This commit is contained in:
parent
11568b1278
commit
2a05f2d3df
1 changed files with 21 additions and 21 deletions
|
@ -52,18 +52,18 @@ if(os.type().indexOf("Windows") > -1)
|
|||
//throw exceptions if abiword is dieing
|
||||
abiword.on('exit', function (code)
|
||||
{
|
||||
if(code != 0) {
|
||||
if(code !== 0) {
|
||||
throw "Abiword died with exit code " + code;
|
||||
}
|
||||
|
||||
if(stdoutBuffer != "")
|
||||
if(stdoutBuffer !== "")
|
||||
{
|
||||
console.log(stdoutBuffer);
|
||||
}
|
||||
|
||||
callback();
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
exports.convertFile = function(srcFile, destFile, type, callback)
|
||||
{
|
||||
|
@ -96,7 +96,7 @@ else
|
|||
var stdoutBuffer = "";
|
||||
var firstPrompt = true;
|
||||
|
||||
function onAbiwordStdout(data)
|
||||
var onAbiwordStdout = function onAbiwordStdout(data)
|
||||
{
|
||||
//add data to buffer
|
||||
stdoutBuffer+=data.toString();
|
||||
|
@ -112,7 +112,7 @@ else
|
|||
|
||||
//call the callback with the error message
|
||||
//skip the first prompt
|
||||
if(stdoutCallback != null && !firstPrompt)
|
||||
if(stdoutCallback && !firstPrompt)
|
||||
{
|
||||
stdoutCallback(err);
|
||||
stdoutCallback = null;
|
||||
|
@ -120,7 +120,7 @@ else
|
|||
|
||||
firstPrompt = false;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
doConvertTask = function(task, callback)
|
||||
{
|
||||
|
@ -132,7 +132,7 @@ else
|
|||
callback();
|
||||
task.callback(err);
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
//Queue with the converts we have to do
|
||||
var queue = async.queue(doConvertTask, 1);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue