]> _ Git - fluidbook-html5.git/commitdiff
wait #4060 @0.5
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 16 Nov 2020 10:35:51 +0000 (11:35 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 16 Nov 2020 10:35:51 +0000 (11:35 +0100)
js/libs/fluidbook/cart/fluidbook.cart.puma.js

index 601be27ebf68c19d591743a37e01b34f3cebb92c..cb2d5437d3057f9ab38f04f72b0517e58167f0ea 100644 (file)
@@ -25,7 +25,7 @@ FluidbookCartPuma.prototype = {
     },
 
     addToCart: function (ref, quantity) {
-        if (this.items.getItems().indexOf(ref) === -1) {
+        if (this.getItems().indexOf(ref) === -1) {
             this.items.push(ref);
             this.save();
             return true;
@@ -81,7 +81,8 @@ FluidbookCartPuma.prototype = {
 
     getItems: function () {
         var res = [];
-        $(this.getItems()).each(function (i, ref) {
+        var $this=this;
+        $(this.items).each(function (i, ref) {
             if ($this.data[ref] !== undefined && $this.data[ref] !== null) {
                 res.push(ref);
             }