fix warning message
parent
503fc13fda
commit
2c10738331
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue