mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-06-16 03:04:53 -04:00
ImportHandler: early return by condition inversion
No functional changes
This commit is contained in:
parent
2b8e45e2bd
commit
12bb97dc2d
1 changed files with 19 additions and 17 deletions
|
@ -227,7 +227,12 @@ exports.doImport = function(req, res, padId)
|
||||||
|
|
||||||
//read the text
|
//read the text
|
||||||
function(callback) {
|
function(callback) {
|
||||||
if(!directDatabaseAccess){
|
if (directDatabaseAccess) {
|
||||||
|
callback();
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
fs.readFile(destFile, "utf8", function(err, _text){
|
fs.readFile(destFile, "utf8", function(err, _text){
|
||||||
if(ERR(err, callback)) return;
|
if(ERR(err, callback)) return;
|
||||||
text = _text;
|
text = _text;
|
||||||
|
@ -243,9 +248,6 @@ exports.doImport = function(req, res, padId)
|
||||||
callback();
|
callback();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}else{
|
|
||||||
callback();
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
//change text of the pad and broadcast the changeset
|
//change text of the pad and broadcast the changeset
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue