Skip to content

Commit e741f0b

Browse files
javiercnCopilot
andauthored
Apply suggestion from @Copilot
Co-authored-by: Copilot <[email protected]>
1 parent 4bc47f9 commit e741f0b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Components/Components/src/Rendering/ComponentState.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,9 @@ internal ValueTask DisposeInBatchAsync(RenderBatchBuilder batchBuilder)
362362
{
363363
ref var currentFrame = ref frames.Array[i];
364364

365-
Debug.Assert(currentFrame.FrameType == RenderTreeFrameType.Component && currentFrame.Component != null, "GetComponentKey is being invoked too soon, ComponentState is not fully constructed.");
365+
Debug.Assert(
366+
currentFrame.FrameType == RenderTreeFrameType.Component && currentFrame.Component != null,
367+
"GetComponentKey requires the current frame to be of type 'Component' and its 'Component' property to be non-null. Ensure that ComponentState is fully constructed and the parent render tree is properly initialized before invoking this method.");
366368

367369
if (currentFrame.FrameType != RenderTreeFrameType.Component ||
368370
!ReferenceEquals(Component, currentFrame.Component))

0 commit comments

Comments
 (0)