diff --git a/ui/v2.5/src/patch.tsx b/ui/v2.5/src/patch.tsx index 548993a07..2d1d3543e 100644 --- a/ui/v2.5/src/patch.tsx +++ b/ui/v2.5/src/patch.tsx @@ -39,7 +39,13 @@ export function RegisterComponent( ) { // register with the plugin api if (components[component]) { - throw new Error("Component " + component + " has already been registered"); + // only throw an error in production, in development we allow + // multiple registrations to allow for hot reloading of components + if (!import.meta.env.DEV) { + throw new Error( + "Component " + component + " has already been registered" + ); + } } components[component] = fn;