Skip to content

Commit 9a9f832

Browse files
committed
A default value to ward off deserialization exceptions
Happens when server side rendering is disabled.
1 parent 2a66b0e commit 9a9f832

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/React.Router/ReactRouterFunctions.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,10 @@ public class ReactRouterFunctions : RenderFunctionsBase
99
{
1010
/// <summary>
1111
/// The returned react router context, as a JSON string
12+
/// A default value wards off deserialization exceptions
13+
/// when server side rendering is disabled
1214
/// </summary>
13-
public string ReactRouterContext { get; private set; }
15+
public string ReactRouterContext { get; private set; } = "{}";
1416

1517
/// <summary>
1618
/// Implementation of PreRender

0 commit comments

Comments
 (0)