]> _ Git - fluidbook-html5.git/commitdiff
wait #5257 @0.5
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 26 Apr 2022 10:31:23 +0000 (12:31 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 26 Apr 2022 10:31:23 +0000 (12:31 +0200)
js/libs/fluidbook/fluidbook.cart.js

index 73c2b3a924426343f13c47fdc51ff941ecb866c5..19184caf327e491de024d9ab51d5b022ced30a58 100644 (file)
@@ -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');
                 }