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


The following commit(s) were added to refs/heads/develop by this push:
     new 82a798a113 Workaround potential runtime setting of undefined as 
(should be String) text value
82a798a113 is described below

commit 82a798a113081fee70fc520015f0a9a2069f7638
Author: greg-dove <[email protected]>
AuthorDate: Wed Aug 3 10:42:48 2022 +1200

    Workaround potential runtime setting of undefined as (should be String) 
text value
---
 frameworks/projects/MXRoyale/src/main/royale/mx/core/UITextField.as | 2 ++
 1 file changed, 2 insertions(+)

diff --git 
a/frameworks/projects/MXRoyale/src/main/royale/mx/core/UITextField.as 
b/frameworks/projects/MXRoyale/src/main/royale/mx/core/UITextField.as
index f8eaf59280..9d3c1ab47e 100644
--- a/frameworks/projects/MXRoyale/src/main/royale/mx/core/UITextField.as
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/core/UITextField.as
@@ -765,6 +765,8 @@ public class UITextField  extends UIComponent implements 
IUITextField
              }
              COMPILE::JS
              {
+                 //bindings can sometimes set this to undefined at runtime, 
which should be coerced to null
+                 if (typeof value == 'undefined') value = null;
                  _text = value;
                  this.element.innerText = value;
                  this.dispatchEvent('textChange');

Reply via email to