Permalink
Browse files

Fix duplicate callbacks from some functions when called incorrectly

(closes bug #24, reported by Kishore Nallan)
  • Loading branch information...
1 parent 1fe0b3a commit 86e5307f1ec813110da14cc104675f691564c72e @abh abh committed Feb 1, 2012
Showing with 8 additions and 4 deletions.
  1. +4 −0 Changes
  2. +3 −3 lib/main.js
  3. +1 −1 package.json
View
@@ -1,3 +1,7 @@
+1.0.1 February 1st, 2012
+ - Fix duplicate callbacks from some functions when called incorrectly
+ (bug #24, reported by Kishore Nallan)
+
1.0.0 December 6th, 2011
- Add APIs and tests for Plans and "Invoice Items"
(both changes by Ryan Ettipio)
View
@@ -125,7 +125,7 @@ module.exports = function (api_key, options) {
},
retrieve: function(customer_id, cb) {
if (!(customer_id && typeof customer_id === 'string')) {
- cb("customer_id required");
+ return cb("customer_id required");
}
get("/v1/customers/" + customer_id, {}, cb);
},
@@ -151,7 +151,7 @@ module.exports = function (api_key, options) {
},
retrieve: function(plan_id, cb) {
if (!(plan_id && typeof plan_id === 'string')) {
- cb("plan_id required");
+ return cb("plan_id required");
}
get("/v1/plans/" + plan_id, {}, cb);
},
@@ -179,7 +179,7 @@ module.exports = function (api_key, options) {
},
retrieve: function(invoice_item_id, cb) {
if (!(invoice_item_id && typeof invoice_item_id === 'string')) {
- cb("invoice_item_id required");
+ return cb("invoice_item_id required");
}
get("/v1/invoiceitems/" + invoice_item_id, {}, cb);
},
View
@@ -2,7 +2,7 @@
"author": "Ask Bjørn Hansen <ask@develooper.com> (http://www.askask.com/)",
"name": "stripe",
"description": "Stripe API wrapper",
- "version": "1.0.0",
+ "version": "1.0.1",
"homepage": "https://github.com/abh/node-stripe",
"repository": {
"type": "git",

0 comments on commit 86e5307

Please sign in to comment.