Skip to content

Commit

Permalink
Fix: Fixed System.InvalidOperationException (#12184)
Browse files Browse the repository at this point in the history
  • Loading branch information
yaira2 committed Apr 24, 2023
1 parent b125abf commit de2d8ef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Files.App/UserControls/Widgets/DrivesWidget.xaml.cs
Expand Up @@ -148,7 +148,7 @@ private async void Drives_CollectionChanged(object? sender, NotifyCollectionChan
{
await DispatcherQueue.EnqueueAsync(async () =>
{
foreach (DriveItem drive in drivesViewModel.Drives)
foreach (DriveItem drive in drivesViewModel.Drives.ToList())
{
if (!ItemsAdded.Any(x => x.Item == drive) && drive.Type != DriveType.VirtualDrive)
{
Expand Down

0 comments on commit de2d8ef

Please sign in to comment.