Permalink
Browse files

Edited getPads function to be able to work without callback

  • Loading branch information...
1 parent c9f137b commit e9726890a4aa4c80bebac2c8e6c3af29522495a5 @spcsser committed Jan 11, 2013
Showing with 6 additions and 2 deletions.
  1. +5 −1 src/node/db/PadManager.js
  2. +1 −1 src/package.json
@@ -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
View
@@ -46,5 +46,5 @@
"engines" : { "node" : ">=0.6.0",
"npm" : ">=1.0"
},
- "version" : "1.2.3"
+ "version" : "1.2.4"
}

0 comments on commit e972689

Please sign in to comment.