{ "id": "128048", "key": "AC-1651", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "12217", "key": "AC", "name": "Appcelerator - INBOX", "projectCategory": { "id": "10000", "description": "", "name": "Customer Service" } }, "resolution": { "id": "5", "description": "All attempts at reproducing this issue failed, or not enough information was available to reproduce the issue. Reading the code produces no clues as to why this behavior would occur. If more information appears later, please reopen the issue.", "name": "Cannot Reproduce" }, "resolutiondate": "2014-05-04T06:20:12.000+0000", "created": "2014-03-24T01:25:25.000+0000", "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2016-03-08T07:38:08.000+0000", "status": { "description": "A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.", "name": "Resolved", "id": "5", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "14544", "name": "Alloy", "description": "Please enter tickets related to the Alloy here." } ], "description": "When compiling a version of code with minified js, Uglify-js does not correctly handle the following statement in Alloy Controllers\r\n{code}\r\nvar args = arguments[0] || {};\r\n{code}\r\n\r\nAs \"arguments\" is not wrapped in any kind of function, uglify js interprets this as a variable, rather than a javascript type. This conversion, causes Alloy-based projects to fail.\r\n\r\nThe only workaround I've been able to figure out so far is:\r\n{code}\r\nvar args = eval(\"arguments\")[0] || {};\r\n{code}\r\nThe original statement is per the documentation @\r\n\r\nhttp://docs.appcelerator.com/titanium/latest/#!/guide/Alloy_Controllers\r\n\r\n\r\n", "attachment": [], "flagged": false, "summary": "Alloy > Uglify converts arguments[0] causing controller creation to fail.", "creator": { "name": "andrew@gstreetmedia.com", "key": "andrew@gstreetmedia.com", "displayName": "Andrew Greenstreet", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "andrew@gstreetmedia.com", "key": "andrew@gstreetmedia.com", "displayName": "Andrew Greenstreet", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "3.2+", "comment": { "comments": [ { "id": "298362", "author": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~andrew@gstreetmedia.com] Thanks for reporting this issue. Are you using Studio or CLI to compile your project? Please let us know the command you are using to compile the project and we would try to reproduce this issue in-house.", "updateAuthor": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-03-24T03:07:12.000+0000", "updated": "2014-03-24T03:07:12.000+0000" }, { "id": "298399", "author": { "name": "andrew@gstreetmedia.com", "key": "andrew@gstreetmedia.com", "displayName": "Andrew Greenstreet", "active": true, "timeZone": "America/Los_Angeles" }, "body": "In this case, just using the CLI with:\n\nti build --platform mobileweb --deploy-type production\n\n", "updateAuthor": { "name": "andrew@gstreetmedia.com", "key": "andrew@gstreetmedia.com", "displayName": "Andrew Greenstreet", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-03-24T12:56:28.000+0000", "updated": "2014-03-24T12:56:28.000+0000" }, { "id": "299295", "author": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Andrew - I am not able to reproduce this issue. I added the following code and the project compiles fine.\n\nvar args = arguments[0] || {};\n$.rowView.title = args.title || '';\n$.rowView.url = args.url || '';\n\nMay be it would help if we have your project to reproduce the issue.", "updateAuthor": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-03-31T05:20:07.000+0000", "updated": "2014-03-31T05:20:07.000+0000" }, { "id": "303432", "author": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Resolving this ticket as we have not been able to reproduce this issue based on the information provided. We would be happy to reopen this ticket once we have more information available.", "updateAuthor": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-05-04T06:20:12.000+0000", "updated": "2014-05-04T06:20:12.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }