Skip to content

Commit 63aca6e

Browse files
Jack251970Copilot
andauthored
Fix possible invalid operation
Co-authored-by: Copilot <[email protected]>
1 parent 5317409 commit 63aca6e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Flow.Launcher.Core/Plugin/PluginManager.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -701,7 +701,8 @@ internal static async Task UninstallPluginAsync(PluginMetadata plugin, bool remo
701701
Settings.RemovePluginSettings(plugin.ID);
702702
AllPlugins.RemoveAll(p => p.Metadata.ID == plugin.ID);
703703
GlobalPlugins.RemoveWhere(p => p.Metadata.ID == plugin.ID);
704-
foreach (var key in NonGlobalPlugins.Where(p => p.Value.Metadata.ID == plugin.ID).Select(p => p.Key))
704+
var keysToRemove = NonGlobalPlugins.Where(p => p.Value.Metadata.ID == plugin.ID).Select(p => p.Key).ToList();
705+
foreach (var key in keysToRemove)
705706
{
706707
NonGlobalPlugins.Remove(key);
707708
}

0 commit comments

Comments
 (0)