{"action":"created","issue":{"url":"https://api.github.com/repos/mleibman/SlickGrid/issues/1032","labels_url":"https://api.github.com/repos/mleibman/SlickGrid/issues/1032/labels{/name}","comments_url":"https://api.github.com/repos/mleibman/SlickGrid/issues/1032/comments","events_url":"https://api.github.com/repos/mleibman/SlickGrid/issues/1032/events","html_url":"https://github.com/mleibman/SlickGrid/issues/1032","id":48846871,"number":1032,"title":"CompileAccumulatorLoop: TypeError: Cannot assign to read only property 'name' of function","user":{"login":"wajda","id":795479,"avatar_url":"https://avatars.githubusercontent.com/u/795479?v=3","gravatar_id":"","url":"https://api.github.com/users/wajda","html_url":"https://github.com/wajda","followers_url":"https://api.github.com/users/wajda/followers","following_url":"https://api.github.com/users/wajda/following{/other_user}","gists_url":"https://api.github.com/users/wajda/gists{/gist_id}","starred_url":"https://api.github.com/users/wajda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wajda/subscriptions","organizations_url":"https://api.github.com/users/wajda/orgs","repos_url":"https://api.github.com/users/wajda/repos","events_url":"https://api.github.com/users/wajda/events{/privacy}","received_events_url":"https://api.github.com/users/wajda/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2014-11-14T22:16:14Z","updated_at":"2015-06-02T08:45:46Z","closed_at":null,"body":"When using minification (UglifyJS2) the browser complains about assigning to read only property 'name' of anonymous function.\r\nIt's file ```slick.dataview.js```, function ```compileAccumulatorLoop```, the following line:\r\n```  fn.displayName = fn.name = \"compiledAccumulatorLoop\";```\r\n\r\nin:\r\n\r\n```\r\nfunction compileAccumulatorLoop(aggregator) {\r\n      var accumulatorInfo = getFunctionInfo(aggregator.accumulate);\r\n      var fn = new Function(\r\n          \"_items\",\r\n          \"for (var \" + accumulatorInfo.params[0] + \", _i=0, _il=_items.length; _i<_il; _i++) {\" +\r\n              accumulatorInfo.params[0] + \" = _items[_i]; \" +\r\n              accumulatorInfo.body +\r\n          \"}\"\r\n      );\r\n      fn.displayName = fn.name = \"compiledAccumulatorLoop\";\r\n      return fn;\r\n    }\r\n```"},"comment":{"url":"https://api.github.com/repos/mleibman/SlickGrid/issues/comments/107867203","html_url":"https://github.com/mleibman/SlickGrid/issues/1032#issuecomment-107867203","issue_url":"https://api.github.com/repos/mleibman/SlickGrid/issues/1032","id":107867203,"user":{"login":"6pac","id":143957,"avatar_url":"https://avatars.githubusercontent.com/u/143957?v=3","gravatar_id":"","url":"https://api.github.com/users/6pac","html_url":"https://github.com/6pac","followers_url":"https://api.github.com/users/6pac/followers","following_url":"https://api.github.com/users/6pac/following{/other_user}","gists_url":"https://api.github.com/users/6pac/gists{/gist_id}","starred_url":"https://api.github.com/users/6pac/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/6pac/subscriptions","organizations_url":"https://api.github.com/users/6pac/orgs","repos_url":"https://api.github.com/users/6pac/repos","events_url":"https://api.github.com/users/6pac/events{/privacy}","received_events_url":"https://api.github.com/users/6pac/received_events","type":"User","site_admin":false},"created_at":"2015-06-02T08:45:46Z","updated_at":"2015-06-02T08:45:46Z","body":"Yeah, I'd regard the naming as sugar.\r\nSeems the support is patchy\r\n\r\nhttp://stackoverflow.com/questions/11486459/why-doesnt-javascript-allow-assigning-the-property-name-on-a-function"}}