There was an error while loading. Please reload this page.
1 parent ad7e37b commit 054b572Copy full SHA for 054b572
1 file changed
src/core/decorators/component/component.ts
@@ -5,6 +5,7 @@
5
*/
6
7
import type { IComponent } from 'jodit/types';
8
+import { IS_PROD } from 'jodit/core/constants';
9
import { getClassName } from 'jodit/core/helpers/utils/get-class-name';
10
11
/**
@@ -51,7 +52,7 @@ export function component<T extends ComponentCompatible>(
51
52
53
const name = getClassName(constructorFunction.prototype);
54
- if (componentRegistry.has(name)) {
55
+ if (componentRegistry.has(name) && !IS_PROD) {
56
throw new Error(`Component with name "${name}" is already registered`);
57
}
58
0 commit comments