You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by gr...@apache.org on 2022/08/02 22:42:59 UTC
[royale-asjs] branch develop updated: Workaround potential runtime setting of undefined as (should be String) text value
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 <gr...@gmail.com>
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');