We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b00c79c commit 2876cf9Copy full SHA for 2876cf9
package/src/api-custom-element.ts
@@ -322,9 +322,9 @@ export class VueElement extends BaseClass {
322
if (!this._config.shadowRoot) {
323
this._slots = {};
324
325
- const processChildNodes = (nodes: NodeListOf<ChildNode>): any[] => {
+ const processChildNodes = (nodes: NodeList): (string | VNode)[] => {
326
return Array.from(nodes)
327
- .map((node) => {
+ .map((node) : string | VNode | null => {
328
if (node.nodeType === Node.ELEMENT_NODE) {
329
const element = node as HTMLElement;
330
const attributes = Object.fromEntries(
@@ -340,7 +340,7 @@ export class VueElement extends BaseClass {
340
}
341
return null;
342
})
343
- .filter(Boolean);
+ .filter((node): node is string | VNode => node != null);
344
};
345
346
for (const child of Array.from(this.childNodes)) {
0 commit comments