From c228b251b2361d2dd7b7da5c2ae91b2fd16c5340 Mon Sep 17 00:00:00 2001 From: chris Date: Wed, 23 Apr 2025 10:37:52 +0200 Subject: [PATCH] MINOR,FEAT: return parent if child is undefined to allow empty method stubs --- src/componentAncestry/wrapperComponent.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/componentAncestry/wrapperComponent.js b/src/componentAncestry/wrapperComponent.js index 48d5a9f..dd4bd8d 100644 --- a/src/componentAncestry/wrapperComponent.js +++ b/src/componentAncestry/wrapperComponent.js @@ -189,6 +189,8 @@ class ChildbearerComponent extends ElementWrapper { * @returns {Component} this component object */ childContext(component) { + if (!component) return this; + if (arguments.length > 1) { for (let i = 0; i < arguments.length; i++) { this.childContext(arguments[i]);