diff options
author | Swen <swen.jung@psx-technology.com> | 2013-01-11 04:43:59 +0100 |
---|---|---|
committer | Swen <swen.jung@psx-technology.com> | 2013-01-11 04:43:59 +0100 |
commit | e9726890a4aa4c80bebac2c8e6c3af29522495a5 (patch) | |
tree | 0a2c046ffa1850c331a84c22baf607ed7929e8f8 /src/node/db | |
parent | c9f137b2e581339b46522bf6ce70ce9b0eb5612d (diff) | |
download | etherpad-lite-e9726890a4aa4c80bebac2c8e6c3af29522495a5.zip |
Edited getPads function to be able to work without callback
Diffstat (limited to 'src/node/db')
-rw-r--r-- | src/node/db/PadManager.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/node/db/PadManager.js b/src/node/db/PadManager.js index 32119038..82bc27d0 100644 --- a/src/node/db/PadManager.js +++ b/src/node/db/PadManager.js @@ -150,7 +150,11 @@ exports.getPad = function(id, text, callback) exports.getPads = function(callback) { - callback(null,padList.getPads()); + if(callback != null){ + callback(null,padList.getPads()); + }else{ + return padList.getPads(); + } } //checks if a pad exists |