Skip to content

Commit 84e8c84

Browse files
committed
refactor: 增加 null 保护防止报异常
1 parent eec9725 commit 84e8c84

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/BootstrapBlazor/Services/CacheManager.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ private static JsonLocalizationOptions GetJsonLocalizationOption()
246246
{
247247
value = kv.Key;
248248
}
249-
return new LocalizedString(kv.Key, value!, false, typeName);
249+
return new LocalizedString(kv.Key, value ?? "", false, typeName);
250250
});
251251
#if NET8_0_OR_GREATER
252252
return items?.ToFrozenSet();

0 commit comments

Comments
 (0)