@everymatrix/general-registration 1.19.6 → 1.20.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,18 @@
1
1
  'use strict';
2
2
 
3
+ function safeDecorator(fn) {
4
+ // eslint-disable-next-line func-names
5
+ return function (...args) {
6
+ try {
7
+ return fn.apply(this, args);
8
+ }
9
+ catch (error) {
10
+ if (error instanceof DOMException &&
11
+ error.message.includes('has already been used with this registry')) {
12
+ return false;
13
+ }
14
+ throw error;
15
+ }
16
+ };
17
+ }
18
+ customElements.define = safeDecorator(customElements.define);
@@ -1 +1,17 @@
1
+ function safeDecorator(fn) {
2
+ // eslint-disable-next-line func-names
3
+ return function (...args) {
4
+ try {
5
+ return fn.apply(this, args);
6
+ }
7
+ catch (error) {
8
+ if (error instanceof DOMException &&
9
+ error.message.includes('has already been used with this registry')) {
10
+ return false;
11
+ }
12
+ throw error;
13
+ }
14
+ };
15
+ }
16
+ customElements.define = safeDecorator(customElements.define);
1
17
  export * from './components';
@@ -1 +1,18 @@
1
1
  export { setAssetPath, setPlatformOptions } from '@stencil/core/internal/client';
2
+
3
+ function safeDecorator(fn) {
4
+ // eslint-disable-next-line func-names
5
+ return function (...args) {
6
+ try {
7
+ return fn.apply(this, args);
8
+ }
9
+ catch (error) {
10
+ if (error instanceof DOMException &&
11
+ error.message.includes('has already been used with this registry')) {
12
+ return false;
13
+ }
14
+ throw error;
15
+ }
16
+ };
17
+ }
18
+ customElements.define = safeDecorator(customElements.define);
package/dist/esm/index.js CHANGED
@@ -1 +1,16 @@
1
-
1
+ function safeDecorator(fn) {
2
+ // eslint-disable-next-line func-names
3
+ return function (...args) {
4
+ try {
5
+ return fn.apply(this, args);
6
+ }
7
+ catch (error) {
8
+ if (error instanceof DOMException &&
9
+ error.message.includes('has already been used with this registry')) {
10
+ return false;
11
+ }
12
+ throw error;
13
+ }
14
+ };
15
+ }
16
+ customElements.define = safeDecorator(customElements.define);
@@ -0,0 +1 @@
1
+ var t;customElements.define=(t=customElements.define,function(...e){try{return t.apply(this,e)}catch(t){if(t instanceof DOMException&&t.message.includes("has already been used with this registry"))return!1;throw t}});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everymatrix/general-registration",
3
- "version": "1.19.6",
3
+ "version": "1.20.0",
4
4
  "main": "./dist/index.cjs.js",
5
5
  "module": "./dist/index.js",
6
6
  "es2015": "./dist/esm/index.mjs",