Skip to content

Commit de2d8ef

Browse files
authored
Fix: Fixed System.InvalidOperationException (#12184)
1 parent b125abf commit de2d8ef

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Files.App/UserControls/Widgets/DrivesWidget.xaml.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ private async void Drives_CollectionChanged(object? sender, NotifyCollectionChan
148148
{
149149
await DispatcherQueue.EnqueueAsync(async () =>
150150
{
151-
foreach (DriveItem drive in drivesViewModel.Drives)
151+
foreach (DriveItem drive in drivesViewModel.Drives.ToList())
152152
{
153153
if (!ItemsAdded.Any(x => x.Item == drive) && drive.Type != DriveType.VirtualDrive)
154154
{

0 commit comments

Comments
 (0)