Skip to content

Commit 948a3f5

Browse files
committed
fix: 修复删除按钮
1 parent eae05b3 commit 948a3f5

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/BootstrapBlazor.Server/Components/Pages/CacheList.razor.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,11 @@ protected override void OnInitialized()
3232

3333
private void OnDelete(object key)
3434
{
35-
CacheManager.Clear(key);
36-
UpdateCacheList();
35+
if (key is ICacheEntry entry)
36+
{
37+
CacheManager.Clear(entry.Key);
38+
UpdateCacheList();
39+
}
3740
}
3841

3942
private void OnDeleteAll()

0 commit comments

Comments
 (0)