{"action":"created","issue":{"url":"https://api.github.com/repos/benbria/d3.chart.bubble-matrix/issues/5","labels_url":"https://api.github.com/repos/benbria/d3.chart.bubble-matrix/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/benbria/d3.chart.bubble-matrix/issues/5/comments","events_url":"https://api.github.com/repos/benbria/d3.chart.bubble-matrix/issues/5/events","html_url":"https://github.com/benbria/d3.chart.bubble-matrix/issues/5","id":56335736,"number":5,"title":"Uncaught TypeError: Cannot read property 'indexOf' of undefined","user":{"login":"trobrock","id":94053,"avatar_url":"https://avatars.githubusercontent.com/u/94053?v=3","gravatar_id":"","url":"https://api.github.com/users/trobrock","html_url":"https://github.com/trobrock","followers_url":"https://api.github.com/users/trobrock/followers","following_url":"https://api.github.com/users/trobrock/following{/other_user}","gists_url":"https://api.github.com/users/trobrock/gists{/gist_id}","starred_url":"https://api.github.com/users/trobrock/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trobrock/subscriptions","organizations_url":"https://api.github.com/users/trobrock/orgs","repos_url":"https://api.github.com/users/trobrock/repos","events_url":"https://api.github.com/users/trobrock/events{/privacy}","received_events_url":"https://api.github.com/users/trobrock/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-02-03T05:32:00Z","updated_at":"2015-02-03T05:43:59Z","closed_at":null,"body":"On a mobile device when I rotate the device I get the titled error on the last line of this code:\r\n\r\n```javascript\r\nfunction _onModeChange() {\r\n\r\n    var chart = this;\r\n\r\n    for(var layerName in chart._layersArguments) {\r\n      \r\n      // is this chart in the current mode?\r\n      var layerArgs = chart._layersArguments[layerName];\r\n      \r\n      // if this layer should not exist in the current mode\r\n      // unlayer it and then save it so we can reattach it \r\n      // later.\r\n      if (layerArgs.options.modes.indexOf(chart.mode()) === -1) {\r\n```\r\n\r\nIt seems like it doesnt cause the code to fully crash, I'm not too familiar with the internals of this code and am hoping for some guidance on what this might be, or if anyone else has already seen this."},"comment":{"url":"https://api.github.com/repos/benbria/d3.chart.bubble-matrix/issues/comments/72596126","html_url":"https://github.com/benbria/d3.chart.bubble-matrix/issues/5#issuecomment-72596126","issue_url":"https://api.github.com/repos/benbria/d3.chart.bubble-matrix/issues/5","id":72596126,"user":{"login":"trobrock","id":94053,"avatar_url":"https://avatars.githubusercontent.com/u/94053?v=3","gravatar_id":"","url":"https://api.github.com/users/trobrock","html_url":"https://github.com/trobrock","followers_url":"https://api.github.com/users/trobrock/followers","following_url":"https://api.github.com/users/trobrock/following{/other_user}","gists_url":"https://api.github.com/users/trobrock/gists{/gist_id}","starred_url":"https://api.github.com/users/trobrock/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trobrock/subscriptions","organizations_url":"https://api.github.com/users/trobrock/orgs","repos_url":"https://api.github.com/users/trobrock/repos","events_url":"https://api.github.com/users/trobrock/events{/privacy}","received_events_url":"https://api.github.com/users/trobrock/received_events","type":"User","site_admin":false},"created_at":"2015-02-03T05:43:59Z","updated_at":"2015-02-03T05:43:59Z","body":"It looks like this is related to the \"modes\" functionality of d3.chart.base. I'll send a PR with a fix."}}