{ "id": "151888", "key": "AC-452", "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": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2015-11-07T17:45:28.000+0000", "created": "2015-10-09T09:49:27.000+0000", "labels": [ "ios" ], "versions": [], "issuelinks": [], "assignee": { "name": "shossain", "key": "shossain", "displayName": "Shak Hossain", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2015-11-07T17:45:28.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": "14548", "name": "Titanium SDK & CLI", "description": "Please enter tickets related to the MobileSDK here." } ], "description": "The following code:\r\n{code:javascript}\r\nvar target = 'map1';\r\nvar listeners = [];\r\nvar harry = listeners[target] || [];\r\nTi.API.debug(harry);\r\nharry.push(target);\r\nTi.API.debug(target);\r\nTi.API.debug(harry);\r\n{code}\r\n\r\nProduces the following:\r\n{noformat}\r\n[DEBUG] : (\r\n[DEBUG] : )\r\n[DEBUG] : map1\r\n[DEBUG] : (\r\n[DEBUG] : map1\r\n[DEBUG] : )\r\n{noformat}\r\n\r\nHowever, change the target value to 'map'\r\n{code:javascript}\r\nvar target = 'map';\r\n{code}\r\nAnd the following occurs\r\n{noformat}\r\n[DEBUG] : \r\n[ERROR] : Script Error {\r\n[ERROR] : column = 15;\r\n[ERROR] : line = 55;\r\n[ERROR] : message = \"undefined is not a function (evaluating 'harry.push(target)')\";\r\n[ERROR] : sourceURL = \"file:///Users/.../alloy/controllers/index.js\";\r\n[ERROR] : stack = \"Controller@file:///Users/.../alloy/controllers/index.js:55:15\\ncreateController@file:///Users/.../alloy.js:264:54\\nglobal code@file:///Users/.../app.js:3:23\";\r\n[ERROR] : }\r\n{noformat}", "attachment": [], "flagged": false, "summary": "Adding 'map' to an array within an causes 'undefined is not a function'", "creator": { "name": "lawrence.wilson@abannan.com", "key": "lawrence.wilson@abannan.com", "displayName": "Lawrence Wilson", "active": true, "timeZone": "Europe/London" }, "subtasks": [], "reporter": { "name": "lawrence.wilson@abannan.com", "key": "lawrence.wilson@abannan.com", "displayName": "Lawrence Wilson", "active": true, "timeZone": "Europe/London" }, "environment": "Operating System\r\n Name = Mac OS X\r\n Version = 10.10.5\r\n Architecture = 64bit\r\n # CPUs = 4\r\n Memory = 8.0GB\r\n\r\nTitanium CLI\r\n CLI Version = 3.4.2\r\n node-appc Version = 0.2.25\r\n\r\nTitanium SDKs\r\n 5.0.2.GA\r\n Version = 5.0.2", "comment": { "comments": [ { "id": "366453", "author": { "name": "morahman", "key": "morahman", "displayName": "Motiur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "body": "Hi [~lawrence.wilson@abannan.com],\r\n\r\nIt's not an issue, \"map\" is the keyword for JavaScript that's why it shows this error.\r\n\r\nThanks.", "updateAuthor": { "name": "mrahman", "key": "mrahman", "displayName": "Mostafizur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "created": "2015-10-11T08:46:58.000+0000", "updated": "2015-11-07T17:45:17.000+0000" } ], "maxResults": 1, "total": 1, "startAt": 0 } } }