]> _ Git - fluidbook-html5.git/commitdiff
wip #5259 @0:05
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 5 May 2022 14:20:24 +0000 (16:20 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 5 May 2022 14:20:24 +0000 (16:20 +0200)
js/libs/fluidbook/cart/fluidbook.cart.thiriet.js

index 12f1405f6e7a0b27fec16788948d02168857b3e8..4062966e17de8daf6a6588014d876ba9471831c6 100644 (file)
@@ -8,7 +8,7 @@ function FluidbookCartThiriet(cart) {
 FluidbookCartThiriet.prototype = {
     init: function () {
         $(document).on(this.fluidbook.input.clickEvent, '[data-cart-ref] .add', function () {
-            var ref = $(this).closest('[data-cart-ref]').data('cart-ref');
+            var ref = $(this).closest('[data-cart-ref]').data('cart-ref').toString();
             try {
                 if(ref.indexOf('list_')===0){
                     listProducts(ref.substring(5));
@@ -22,7 +22,7 @@ FluidbookCartThiriet.prototype = {
             return false;
         });
         $(document).on(this.fluidbook.input.clickEvent, '[data-cart-ref] .remove', function () {
-            var ref = $(this).closest('[data-cart-ref]').data('cart-ref');
+            var ref = $(this).closest('[data-cart-ref]').data('cart-ref').toString();
             try {
                 minusProduct(ref);
             } catch (e) {
@@ -33,7 +33,7 @@ FluidbookCartThiriet.prototype = {
         });
 
         $(document).on(this.fluidbook.input.clickEvent, '[data-cart-ref].overlay', function () {
-            var ref = $(this).data('cart-ref');
+            var ref = $(this).data('cart-ref').toString();
             try {
                 if(ref.indexOf('list_')===0){
                     listProducts(ref.substring(5));