apache / apache/royale-asjs

Uncaught TypeError: Cannot read property 'toString' of null (HelloWorld.js:106)

Open
#871 9 comments 0 reactions 0 assignees View on GitHub
Dominant language
ActionScript
Stars
380
Forks
120
PR merge metrics
No merged PRs in 30d

Description

Example : https://paste.apache.org/yizbj
Select Date and click save button then validateFormOnServer function will be called.In that function we are doing
```
var date1:String = cc_AthrzDate.value.toString();
var date2:String = cc_CanclDate.value.toString();
```
cc_AthrzDate is mx:DateField.
cc_AthrzDate.value.toString(); is throwing exception because **cc_AthrzDate.value** is null

Please check this example
![image](https://user-images.githubusercontent.com/42200979/85272082-21e4f000-b495-11ea-9409-c6fd0df6363f.png)

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the validateFormOnServer function and the mx:DateField values shown in the issue, then reproduce the flow by selecting a date and clicking Save. Check how the null value reaches the generated HelloWorld.js at line 106; done means the example no longer throws the TypeError during validation.

Written by the indexing model from the issue text.

Assessment

Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.