From c346173fb6169d6f80a7189314801d8943f0cfa8 Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Mon, 16 Nov 2020 11:35:51 +0100 Subject: [PATCH] wait #4060 @0.5 --- js/libs/fluidbook/cart/fluidbook.cart.puma.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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); } -- 2.39.5