This is an automated email from the ASF dual-hosted git repository.

gregdove pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git

commit 4a57a2a038f92cbb5161108764be2a1009dfe5db
Author: greg-dove <[email protected]>
AuthorDate: Thu Dec 16 13:05:29 2021 +1300

    potential fix for Panel issue in js tests.
---
 frameworks/projects/MXRoyale/src/main/royale/mx/containers/Panel.as | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git 
a/frameworks/projects/MXRoyale/src/main/royale/mx/containers/Panel.as 
b/frameworks/projects/MXRoyale/src/main/royale/mx/containers/Panel.as
index 1511b47..75803d2 100644
--- a/frameworks/projects/MXRoyale/src/main/royale/mx/containers/Panel.as
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/containers/Panel.as
@@ -821,7 +821,8 @@ public class Panel extends Container
         var panelView:PanelView = view as PanelView;
         if (panelView.contentArea == this)
             return super.numElements;
-        return panelView.contentArea.numElements;
+        //likewise, contentArea may not be available yet during early phases, 
use null safety:
+        return panelView.contentArea ? panelView.contentArea.numElements : 0;
     }
     
     /**

Reply via email to