Browse Source

Caching: fixed accuracy of the algorithm in rare scenarios when document content is injected to the TextBlock element

Marcin Ziąbek 9 months ago
parent
commit
d61746d317
1 changed files with 2 additions and 2 deletions
  1. 2 2
      Source/QuestPDF/Drawing/DocumentGenerator.cs

+ 2 - 2
Source/QuestPDF/Drawing/DocumentGenerator.cs

@@ -386,8 +386,8 @@ namespace QuestPDF.Drawing
                         if (textBlockItem is TextBlockPageNumber)
                         if (textBlockItem is TextBlockPageNumber)
                             return false;
                             return false;
                         
                         
-                        if (textBlockItem is TextBlockElement textBlockElement)
-                            return Traverse(textBlockElement.Element);
+                        if (textBlockItem is TextBlockElement textBlockElement && !Traverse(textBlockElement.Element))
+                            return false;
                     }
                     }
 
 
                     return true;
                     return true;