]> _ Git - fluidbook-toolbox.git/commitdiff
wait #6069 @0.25
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 10 Jul 2023 14:10:31 +0000 (16:10 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 10 Jul 2023 14:10:31 +0000 (16:10 +0200)
app/Models/FluidbookPublication.php

index 7940f174ef14fb6ef1639349ba834cc75371539e..3beefe214d7905c9c2a687fb2afdb56dcd4abb38 100644 (file)
@@ -479,11 +479,17 @@ class FluidbookPublication extends ToolboxSettingsModel
      */
     public function getDocument($page)
     {
+        if ($page < 1) {
+            $page = 1;
+        }
         return self::_getDocument($this->getComposition()[$page][0]);
     }
 
     public function getDocumentSize($page = 1)
     {
+        if ($page < 1) {
+            $page = 1;
+        }
         $document = $this->getDocument($page);
         return $document->getPageSize($this->getComposition()[$page][1]);
     }