diff --git a/package.json b/package.json index 25a8df8..05f9272 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "wkit", - "version": "1.12.2", + "version": "1.12.3", "type": "module", "description": "A library for building fast, lightweight web components.", "main": "dist/index.js", diff --git a/src/index.js b/src/index.js index 3b1ce8c..ca46ca7 100644 --- a/src/index.js +++ b/src/index.js @@ -169,8 +169,8 @@ export class Component extends HTMLElement { delete this.props } - static reg(name = '', prefix = 'wc-') { - let key = prefix + name + static reg(name = '', prefix = 'wc') { + let key = prefix + '-' + name if (!customElements.get(key)) { customElements.define(key, this) }