From: Vincent Vanwaelscappel Date: Mon, 16 Nov 2020 10:35:51 +0000 (+0100) Subject: wait #4060 @0.5 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=c346173fb6169d6f80a7189314801d8943f0cfa8;p=fluidbook-html5.git wait #4060 @0.5 --- diff --git a/js/libs/fluidbook/cart/fluidbook.cart.puma.js b/js/libs/fluidbook/cart/fluidbook.cart.puma.js index 601be27e..cb2d5437 100644 --- a/js/libs/fluidbook/cart/fluidbook.cart.puma.js +++ b/js/libs/fluidbook/cart/fluidbook.cart.puma.js @@ -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); }