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) { function(callback) {
var fileEnding = path.extname(srcFile).toLowerCase(); var fileEnding = path.extname(srcFile).toLowerCase();
if (abiword || fileEnding == ".htm" || fileEnding == ".html") { if (abiword || fileEnding == ".htm" || fileEnding == ".html") {
try{ importHtml.setPadHTML(pad, text, function(e){
importHtml.setPadHTML(pad, text); if(e) apiLogger.warn("Error importing, possibly caused by malformed HTML");
}catch(e){ });
apiLogger.warn("Error importing, possibly caused by malformed HTML");
}
} else { } else {
pad.setText(text); pad.setText(text);
} }

View File

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