We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cd7512f commit 70a1d8eCopy full SHA for 70a1d8e
labs/behaviors/element-internals.ts
@@ -68,7 +68,11 @@ export function mixinElementInternals<T extends MixinBase<LitElement>>(
68
return this[privateInternals];
69
}
70
71
- [privateInternals]?: ElementInternals;
+ // In preparation for ES2022, we need to declare this property to guard
72
+ // against the base class calling [internals] in its constructor prematurely
73
+ // setting this field. Without declare, once this field is defined, it would
74
+ // initialize to undefined and `attachInternals()` could be called again.
75
+ declare [privateInternals]?: ElementInternals;
76
77
78
return WithElementInternalsElement;
0 commit comments