fix warning message

pull/2403/merge^2
John McLear 2014-12-27 17:25:45 +01:00
parent 503fc13fda
commit 2c10738331
2 changed files with 4 additions and 6 deletions

View File

@ -196,11 +196,9 @@ exports.doImport = function(req, res, padId)
function(callback) {
var fileEnding = path.extname(srcFile).toLowerCase();
if (abiword || fileEnding == ".htm" || fileEnding == ".html") {
try{
importHtml.setPadHTML(pad, text);
}catch(e){
apiLogger.warn("Error importing, possibly caused by malformed HTML");
}
importHtml.setPadHTML(pad, text, function(e){
if(e) apiLogger.warn("Error importing, possibly caused by malformed HTML");
});
} else {
pad.setText(text);
}

View File

@ -89,7 +89,7 @@ function setPadHTML(pad, html, callback)
apiLogger.debug('The changeset: ' + theChangeset);
pad.setText("");
pad.appendRevision(theChangeset);
callback();
callback(null);
}
exports.setPadHTML = setPadHTML;