Edited getPads function to be able to work without callback

This commit is contained in:
Swen 2013-01-11 04:43:59 +01:00
parent c9f137b2e5
commit e9726890a4
2 changed files with 6 additions and 2 deletions

View File

@ -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 File

@ -46,5 +46,5 @@
"engines" : { "node" : ">=0.6.0",
"npm" : ">=1.0"
},
"version" : "1.2.3"
"version" : "1.2.4"
}