Skip to content

Commit 3e31b2b

Browse files
authored
Fix: Fixed InvalidOperationException in FileTagsContextMenu (#16168)
1 parent 98c7408 commit 3e31b2b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/Files.App/UserControls/Menus/FileTagsContextMenu.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ private void Item_Opening(object? sender, object e)
6363
// go through each tag and find the common one for all files
6464
var commonFileTags = SelectedItems
6565
.Select(x => x?.FileTags ?? Enumerable.Empty<string>())
66+
.DefaultIfEmpty(Enumerable.Empty<string>())
6667
.Aggregate((x, y) => x.Intersect(y))
6768
.Select(x => Items.FirstOrDefault(y => x == ((TagViewModel)y.Tag)?.Uid));
6869

0 commit comments

Comments
 (0)