mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-20 23:46:14 -04:00
db/PadManager: early return, no functional changes
This commit is contained in:
parent
391bd79e03
commit
12f224ae72
1 changed files with 12 additions and 13 deletions
|
@ -159,21 +159,20 @@ exports.getPad = function(id, text, callback)
|
||||||
if(pad != null)
|
if(pad != null)
|
||||||
{
|
{
|
||||||
callback(null, pad);
|
callback(null, pad);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
//try to load pad
|
|
||||||
else
|
|
||||||
{
|
|
||||||
pad = new Pad(id);
|
|
||||||
|
|
||||||
//initalize the pad
|
//try to load pad
|
||||||
pad.init(text, function(err)
|
pad = new Pad(id);
|
||||||
{
|
|
||||||
if(ERR(err, callback)) return;
|
//initalize the pad
|
||||||
globalPads.set(id, pad);
|
pad.init(text, function(err)
|
||||||
padList.addPad(id);
|
{
|
||||||
callback(null, pad);
|
if(ERR(err, callback)) return;
|
||||||
});
|
globalPads.set(id, pad);
|
||||||
}
|
padList.addPad(id);
|
||||||
|
callback(null, pad);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
exports.listAllPads = function(cb)
|
exports.listAllPads = function(cb)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue