@everymatrix/player-bonus-history 1.22.8 → 1.22.10
Sign up to get free protection for your applications and to get access to all the features.
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@everymatrix/player-bonus-history",
|
3
|
-
"version": "1.22.
|
3
|
+
"version": "1.22.10",
|
4
4
|
"main": "dist/player-bonus-history",
|
5
5
|
"svelte": "src/index.ts",
|
6
6
|
"scripts": {
|
@@ -35,5 +35,5 @@
|
|
35
35
|
"publishConfig": {
|
36
36
|
"access": "public"
|
37
37
|
},
|
38
|
-
"gitHead": "
|
38
|
+
"gitHead": "38495c8b7fed86d85f3362fe6419369936e0a28a"
|
39
39
|
}
|
package/src/index.ts
CHANGED
@@ -1,4 +1,22 @@
|
|
1
1
|
import PlayerBonusHistory from './PlayerBonusHistory.svelte';
|
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
|
+
} catch (error) {
|
9
|
+
if (
|
10
|
+
error instanceof DOMException &&
|
11
|
+
error.message.includes('has already been used with this registry') || error.message.includes('Cannot define multiple custom elements with the same tag name')
|
12
|
+
) {
|
13
|
+
return false;
|
14
|
+
}
|
15
|
+
throw error;
|
16
|
+
}
|
17
|
+
};
|
18
|
+
}
|
19
|
+
|
20
|
+
customElements.define = safeDecorator(customElements.define);
|
3
21
|
!customElements.get('player-bonus-history') && customElements.define('player-bonus-history', PlayerBonusHistory);
|
4
22
|
export default PlayerBonusHistory;
|