Permalink
Browse files

FIX undefined options.key

  • Loading branch information...
1 parent 36709d6 commit 3160e3f8f3d2958ff7d9d90fc060ed988f9a5be9 @naholyr committed Aug 3, 2011
Showing with 5 additions and 5 deletions.
  1. +5 −5 lib/url-provider/redis.js
View
@@ -88,12 +88,12 @@ Provider = {
},
"encode": function(url, options, callback) {
- if (typeof options == 'string') {
- options = {"key":options, "new":false};
+ if (typeof callback == 'undefined' && typeof options == 'function') {
+ callback = options;
+ options = {"new":false};
}
- if (typeof callback == 'undefined' && typeof custom_key == 'function') {
- callback = custom_key;
- custom_key = undefined;
+ if (typeof options == 'string' || typeof options == 'undefined') {
+ options = {"key":options, "new":false};
}
var self = this;
self.checkUrl(url, function(err, url) {

0 comments on commit 3160e3f

Please sign in to comment.