Fix delete an item in checkouts list; regression error
authorSteven Chan <steven3416@gmail.com>
Fri, 29 Aug 2014 19:41:07 +0000 (12:41 -0700)
committerSteven Chan <steven3416@gmail.com>
Fri, 29 Aug 2014 19:41:07 +0000 (12:41 -0700)
Signed-off-by: Steven Chan <steven3416@gmail.com>
src/od_api.coffee

index 56cb067..38d758c 100644 (file)
@@ -218,7 +218,7 @@ define [
                                        if id = url.match /\/holds\/(.+)$/
                                                od.$.triggerHandler 'od.hold.delete', reserveId: id[1]
                                        if id = url.match /\/checkouts\/(.+)$/
                                        if id = url.match /\/holds\/(.+)$/
                                                od.$.triggerHandler 'od.hold.delete', reserveId: id[1]
                                        if id = url.match /\/checkouts\/(.+)$/
-                                               od.$.triggerHandler 'od.checkout.delete', reserveId: id[2]
+                                               od.$.triggerHandler 'od.checkout.delete', reserveId: id[1]
 
                        .fail ->
                                od.$.triggerHandler 'od.error', [url, arguments[0]]
 
                        .fail ->
                                od.$.triggerHandler 'od.error', [url, arguments[0]]