{ "id": "167871", "key": "TIMOB-24744", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [], "resolution": { "id": "10100", "description": "This issue won't be actioned.", "name": "Won't Do" }, "resolutiondate": "2019-07-18T14:34:44.000+0000", "created": "2017-05-23T17:06:26.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "ES6", "titanium" ], "versions": [], "issuelinks": [], "assignee": null, "updated": "2019-07-18T14:34:44.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [], "description": "When I have the following code in my controller:\r\n\r\n\r\n{code:java}\r\n// Some comments here\r\nvar toggleRight = e => {\r\n\r\n\t$.rightmenu.zIndex = 500;\r\n\t$.content.animate({\r\n\t\tduration: 500,\r\n\t\tleft: 0,\r\n\t});\r\n};\r\n{code}\r\n\r\n\r\nI get this runtime error in iOS:\r\n\r\n\r\n{noformat}\r\n[ERROR] message = \"Unexpected token ')'\";\r\n{noformat}\r\n\r\n\r\nAndroid works as expected.\r\n\r\n", "attachment": [], "flagged": false, "summary": "iOS: Error when using ES6 arrow function", "creator": { "name": "brentonhouse", "key": "brentonhouse", "displayName": "Brenton House", "active": true, "timeZone": "America/Chicago" }, "subtasks": [], "reporter": { "name": "brentonhouse", "key": "brentonhouse", "displayName": "Brenton House", "active": true, "timeZone": "America/Chicago" }, "environment": "iOS\r\nTI SDK: 6.1.0.v20170519131839 (RC Build)\r\nAlloy: 1.10.0\r\nHyperloop: Not enabled", "comment": { "comments": [ { "id": "420269", "author": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "body": "Please share a full reproducible code/project for us to test the issue. Thanks.", "updateAuthor": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2017-05-23T20:13:50.000+0000", "updated": "2017-05-23T20:13:50.000+0000" }, { "id": "420279", "author": { "name": "brentonhouse", "key": "brentonhouse", "displayName": "Brenton House", "active": true, "timeZone": "America/Chicago" }, "body": "Steps to reproduce:\r\n\r\n1. Create new Titanium project using CLI\r\n2. Open {{index.js}} and replace the following:\r\n\r\n\r\n{code:js}\r\nfunction doClick(e) {\r\n\talert($.label.text);\r\n}\r\n{code}\r\n\r\nwith this code:\r\n\r\n{code:java}\r\nconst doClick = e => {\r\n\talert($.label.text);\r\n};\r\n{code}\r\n\r\n3. Run the app: {{appc ti build --platform ios --target simulator --log-level trace}}", "updateAuthor": { "name": "brentonhouse", "key": "brentonhouse", "displayName": "Brenton House", "active": true, "timeZone": "America/Chicago" }, "created": "2017-05-23T20:45:40.000+0000", "updated": "2017-05-23T20:45:40.000+0000" }, { "id": "420285", "author": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "updateAuthor": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "created": "2017-05-23T21:11:36.000+0000", "updated": "2017-05-23T21:11:36.000+0000" }, { "id": "420286", "author": { "name": "brentonhouse", "key": "brentonhouse", "displayName": "Brenton House", "active": true, "timeZone": "America/Chicago" }, "body": "Thanks [~cwilliams]! I've been going back and forth changing settings trying to recreate that I forgot to switch that back.\r\n\r\nI did set jscore to true and now I get this error:\r\n\r\n{noformat}\r\n[ERROR] message = \"Cannot access uninitialized variable.\";\r\n{noformat}\r\n\r\n\r\n(if I use 'var' instead of 'const' it works fine)", "updateAuthor": { "name": "brentonhouse", "key": "brentonhouse", "displayName": "Brenton House", "active": true, "timeZone": "America/Chicago" }, "created": "2017-05-23T21:17:35.000+0000", "updated": "2017-05-23T21:17:35.000+0000" }, { "id": "449904", "author": { "name": "ahutton", "key": "ahutton", "displayName": "Alan Hutton", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Closing per developer comments,", "updateAuthor": { "name": "ahutton", "key": "ahutton", "displayName": "Alan Hutton", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-07-18T14:34:44.000+0000", "updated": "2019-07-18T14:34:44.000+0000" } ], "maxResults": 6, "total": 6, "startAt": 0 } } }