@open-wc/scoped-elements
Advanced tools
Comparing version 2.1.1 to 2.1.2
# Change Log | ||
## 2.1.2 | ||
### Patch Changes | ||
- bf99826e: Check if `__registry` actually exists on the current class, not a parent. | ||
- 12b9a736: Fixed compatibility with Typescript 4.7 nodeResolution: "node16". | ||
## 2.1.1 | ||
@@ -4,0 +11,0 @@ |
{ | ||
"name": "@open-wc/scoped-elements", | ||
"version": "2.1.1", | ||
"version": "2.1.2", | ||
"publishConfig": { | ||
@@ -16,4 +16,9 @@ "access": "public" | ||
"homepage": "https://github.com/open-wc/open-wc/tree/master/packages/scoped-elements", | ||
"module": "index.js", | ||
"type": "module", | ||
"main": "index.js", | ||
"exports": { | ||
".": { | ||
"types": "./types/index.d.ts", | ||
"default": "./index.js" | ||
} | ||
}, | ||
"scripts": { | ||
@@ -52,3 +57,3 @@ "debug": "cd ../../ && yarn debug --group scoped-elements", | ||
}, | ||
"types": "types/index.d.ts" | ||
"types": "./types/index.d.ts" | ||
} |
@@ -98,3 +98,14 @@ import { dedupeMixin } from '@open-wc/dedupe-mixin'; | ||
if (!this.registry) { | ||
const shouldCreateRegistry = | ||
!this.registry || | ||
// @ts-ignore | ||
(this.registry === this.constructor.__registry && | ||
!Object.prototype.hasOwnProperty.call(this.constructor, '__registry')); | ||
/** | ||
* Create a new registry if: | ||
* - the registry is not defined | ||
* - this class doesn't have its own registry *AND* has no shared registry | ||
*/ | ||
if (shouldCreateRegistry) { | ||
this.registry = supportsScopedRegistry ? new CustomElementRegistry() : customElements; | ||
@@ -101,0 +112,0 @@ for (const [tagName, klass] of Object.entries(scopedElements)) { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
62008
280
No