Barazo default frontend barazo.forum
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix(plugins): await bundled plugin loading before setting state (#205)

loadBundledPlugins was fire-and-forget (void), so the plugin registry
Map was still empty when React re-rendered PluginSlot. By awaiting
the loader before calling setPlugins, the registry is populated before
the re-render that causes PluginSlot to read from it.

authored by

Guido X Jansen and committed by
GitHub
326a48af 9bf0b29d

+2 -2
+2 -2
src/context/plugin-context.tsx
··· 48 48 49 49 try { 50 50 const response = await getPlugins(token) 51 - setPlugins(response.plugins) 52 51 const enabledNames = response.plugins.filter((p) => p.enabled).map((p) => p.name) 53 - void loadBundledPlugins(enabledNames) 52 + await loadBundledPlugins(enabledNames) 53 + setPlugins(response.plugins) 54 54 } catch { 55 55 // On error, keep existing plugins (or empty on first load) 56 56 setPlugins((prev) => prev)