Skip to content

Commit 43b4c10

Browse files
committed
Check for before assign
1 parent d36fb46 commit 43b4c10

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Components/Shared/src/ExpressionFormatting/ExpressionFormatter.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@ internal static class ExpressionFormatter
1414
{
1515
static ExpressionFormatter()
1616
{
17-
HotReloadManager.Default.OnDeltaApplied += ClearCache;
17+
if (HotReloadManager.Default.MetadataUpdateSupported)
18+
{
19+
HotReloadManager.Default.OnDeltaApplied += ClearCache;
20+
}
1821
}
1922

2023
internal const int StackAllocBufferSize = 128;

0 commit comments

Comments
 (0)