From 762883da2f74c89a955a8c75b26a98ce6a56b9a0 Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Tue, 26 Apr 2022 12:31:23 +0200 Subject: [PATCH] wait #5257 @0.5 --- js/libs/fluidbook/fluidbook.cart.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/js/libs/fluidbook/fluidbook.cart.js b/js/libs/fluidbook/fluidbook.cart.js index 73c2b3a9..19184caf 100644 --- a/js/libs/fluidbook/fluidbook.cart.js +++ b/js/libs/fluidbook/fluidbook.cart.js @@ -15,6 +15,9 @@ FluidbookCart.prototype = { var $this = this; this.enabled = true; this.instance = this.createInstance(); + if (this.instance === null) { + return; + } if (this.instance.handleClicks !== true) { $(document).on(this.fluidbook.input.clickEvent, '[data-cart-delete]', function () { @@ -79,7 +82,7 @@ FluidbookCart.prototype = { if (this.fluidbook.settings.cartLinkAppearance === 'overlay') { $('a[data-cart-ref]').each(function () { var size = 2; - var c=[]; + var c = []; if ($(this).outerWidth() < 200) { size = Math.min(size, 0); c.push('small-w'); @@ -95,7 +98,7 @@ FluidbookCart.prototype = { c.push('medium-h'); } - if($(this).outerHeight() < 300){ + if ($(this).outerHeight() < 300) { c.push('condensed-h'); } -- 2.39.5