[AC-6436] Please check the following bug:
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Closed |
Resolution | Invalid |
Resolution Date | 2019-12-26T15:03:45.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Titanium SDK & CLI |
Labels | 8.3.0.v20191115075757 |
Reporter | Andreas Pingas |
Assignee | Motiur Rahman |
Created | 2019-11-18T13:28:38.000+0000 |
Updated | 2019-12-26T15:03:45.000+0000 |
Description
Ti.App.Properties.setString('currentCountry', Titanium.Locale.currentCountry.toUpperCase());
[ERROR] : Script Error {
[ERROR] : column = 77;
[ERROR] : line = 27;
[ERROR] : message = "undefined is not an object (evaluating 'Titanium.Locale.currentCountry.toUpperCase')";
[ERROR] : sourceURL = "file:///Users/sweetpeen/Library/Developer/CoreSimulator/Devices//data/Containers/Bundle/Application//Manager.app/app.js";
[ERROR] : stack = " at (/app.js:27:77)\n at global code(/app.js:461:70)\n at require@[native code]\n at (/ti.main.js:17723:8)\n at loadAsync(/ti.main.js:17649:9)\n at global code(/ti.main.js:17720:10)";
[ERROR] : toJSON = "<KrollCallback: 0x600000316500>";
[ERROR] : }
Hello! Thanks for reaching to us. Please share the following information: 1. Sample test code and steps to reproduce the issue. 2. In which platform are you getting this issue. 3. Share your appc ti info and full trace log. Thanks
BTW: toUpperCase() is not needed since it will return an uppercase value:
with 8.3.0.RC (8.3.0.v20191115162504) *Android*: works fine *iOS (simulator)*: currentCountry is undefined, that's why toUpperCase() will throw an error. *Workaround*: check for undefined and don't use toUpperCase()
Okay thanks!