From 435419817b6213cd702d52777f7d8ea04f6f886d Mon Sep 17 00:00:00 2001 From: Tuomas Hietanen Date: Mon, 8 Jul 2024 13:31:14 +0100 Subject: [PATCH] null-check fix --- src/Giraffe.ViewEngine/StringBuilderPool.fs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Giraffe.ViewEngine/StringBuilderPool.fs b/src/Giraffe.ViewEngine/StringBuilderPool.fs index a26c057..093cdae 100644 --- a/src/Giraffe.ViewEngine/StringBuilderPool.fs +++ b/src/Giraffe.ViewEngine/StringBuilderPool.fs @@ -29,7 +29,7 @@ type public StringBuilderPool = let lifetime = DateTimeOffset.Now - StringBuilderPool.created let expired = lifetime > PoolLimits.MaximumLifetime let sb = StringBuilderPool.instance - if not expired && sb <> null then + if not expired && not (isNull sb) then StringBuilderPool.instance <- null sb.Clear() else new StringBuilder(PoolLimits.MinimumCapacity)