Skip to content

Commit

Permalink
UI: Fix race condition in AvailablePlugins.tsx
Browse files Browse the repository at this point in the history
This race condition happens when available plugin rows are created before the availablePlugins variable is updated.
  • Loading branch information
VakarisZ authored and ordabach committed Sep 7, 2023
1 parent 7ff933a commit f862fe7
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@ const AvailablePlugins = (props) => {

const filterInstalledPlugins = (row: PluginRow) => {
let availablePlugin = availablePlugins.find(availablePlugin => row.id === availablePlugin.id);
if(availablePlugin === undefined) {
return true;
}
return !isPluginInstalled(availablePlugin, installedPlugins) ||
successfullyInstalledPluginsIds.includes(row.id);
}
Expand Down

0 comments on commit f862fe7

Please sign in to comment.