Skip to content

Commit 2ee2cc2

Browse files
authored
[AppBar] Add TryGetValue and Apps.ContainsKey (#4146)
* Add TryGetValue and Apps.ContainsKey * Update Action YML file * Fix TryGetValue tests
1 parent 0a41643 commit 2ee2cc2

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/Core/Components/AppBar/FluentAppBar.razor.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,8 @@ public async Task OverflowRaisedAsync(string value)
126126

127127
foreach (var item in items)
128128
{
129-
if (item.Id is not null)
129+
if (item.Id is not null && _internalAppBarContext.Apps.TryGetValue(item.Id, out var app))
130130
{
131-
var app = _internalAppBarContext.Apps[item.Id];
132131
app.Overflow = item.Overflow;
133132
}
134133
}

0 commit comments

Comments
 (0)