Browse Source

Optimization: collect stack trace only when running with the Companion App

Marcin Ziąbek 1 year ago
parent
commit
680126f436
1 changed files with 5 additions and 1 deletions
  1. 5 1
      Source/QuestPDF/Infrastructure/SourceCodePath.cs

+ 5 - 1
Source/QuestPDF/Infrastructure/SourceCodePath.cs

@@ -22,7 +22,11 @@ internal readonly struct SourceCodePath(StackFrame frame)
         // TODO: revise for dotnet 9
         if (CompanionService.IsDocumentHotReloaded)
             return null;
-
+        
+        #else
+        
+        return null;
+        
         #endif
 
         var stackTrace = new StackTrace(true);