Skip to content

Commit 46425b2

Browse files
authored
Check for rete-element
This solves the problem people having with an error because rete-element already defined.
1 parent d493356 commit 46425b2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/module.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,6 @@ import { CustomComponent } from './custom.component';
4242
export class ReteModule {
4343
constructor(injector: Injector) { // StaticInjectorError due to 'npm link'
4444
const CustomElement = createCustomElement(CustomComponent, { injector });
45-
customElements.define('rete-element', CustomElement);
45+
if (!customElements.get('rete-element')) customElements.define('rete-element', CustomElement);
4646
}
4747
}

0 commit comments

Comments
 (0)