diff --git a/src/node/db/API.js b/src/node/db/API.js index f477b0e9c..fa1fd3056 100644 --- a/src/node/db/API.js +++ b/src/node/db/API.js @@ -399,19 +399,19 @@ exports.getHTML = function(padID, rev, callback) var data = {html: html}; callback(null, data); }); + + return; } + //the client wants the latest text, lets return it to him - else + exportHtml.getPadHTML(pad, undefined, function (err, html) { - exportHtml.getPadHTML(pad, undefined, function (err, html) - { - if(ERR(err, callback)) return; - html = "" +html; // adds HTML head - html += ""; - var data = {html: html}; - callback(null, data); - }); - } + if(ERR(err, callback)) return; + html = "" +html; // adds HTML head + html += ""; + var data = {html: html}; + callback(null, data); + }); }); }