{"action":"created","issue":{"url":"https://api.github.com/repos/mapbox/mapbox-studio/issues/966","labels_url":"https://api.github.com/repos/mapbox/mapbox-studio/issues/966/labels{/name}","comments_url":"https://api.github.com/repos/mapbox/mapbox-studio/issues/966/comments","events_url":"https://api.github.com/repos/mapbox/mapbox-studio/issues/966/events","html_url":"https://github.com/mapbox/mapbox-studio/pull/966","id":46920624,"number":966,"title":"Fix crash when uploading postgis source","user":{"login":"zdavkeos","id":172684,"avatar_url":"https://avatars.githubusercontent.com/u/172684?v=3","gravatar_id":"","url":"https://api.github.com/users/zdavkeos","html_url":"https://github.com/zdavkeos","followers_url":"https://api.github.com/users/zdavkeos/followers","following_url":"https://api.github.com/users/zdavkeos/following{/other_user}","gists_url":"https://api.github.com/users/zdavkeos/gists{/gist_id}","starred_url":"https://api.github.com/users/zdavkeos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zdavkeos/subscriptions","organizations_url":"https://api.github.com/users/zdavkeos/orgs","repos_url":"https://api.github.com/users/zdavkeos/repos","events_url":"https://api.github.com/users/zdavkeos/events{/privacy}","received_events_url":"https://api.github.com/users/zdavkeos/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2014-10-27T15:40:33Z","updated_at":"2015-01-28T21:10:19Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/mapbox/mapbox-studio/pulls/966","html_url":"https://github.com/mapbox/mapbox-studio/pull/966","diff_url":"https://github.com/mapbox/mapbox-studio/pull/966.diff","patch_url":"https://github.com/mapbox/mapbox-studio/pull/966.patch"},"body":"Mapbox-studio crashes when uploading a source if mapnik-omnivore does not support the source format.\r\n\r\nmapnik-omnivore does not support postgis, and returns null for the extents of the data. This patch sidesteps the issue and allows the upload to complete. The user will want to manually specify the extent for the layer.\r\n\r\nBack trace:\r\n```\r\n/mapbox-studio-linux-x64-v0.1.6/resources/app/lib/source.js:310\r\n        memo[0] = Math.max(-180, Math.min(extent[0], memo[0]));\r\n                                                ^\r\nTypeError: Cannot read property '0' of undefined\r\n    at /mapbox-studio-linux-x64-v0.1.6/resources/app/lib/source.js:310:49\r\n    at Array.reduce (native)\r\n    at Function.source.extent (/mapbox-studio-linux-x64-v0.1.6/resources/app/lib/source.js:297:35)\r\n    at copy (/mapbox-studio-linux-x64-v0.1.6/resources/app/lib/source.js:710:47)\r\n    at /mapbox-studio-linux-x64-v0.1.6/resources/app/lib/source.js:703:13\r\n    at source (/mapbox-studio-linux-x64-v0.1.6/resources/app/lib/source.js:97:27)\r\n    at loadf (/mapbox-studio-linux-x64-v0.1.6/resources/app/lib/source.js:699:9)\r\n    at Function.source.uploadStream (/mapbox-studio-linux-x64-v0.1.6/resources/app/lib/source.js:695:5)\r\n    at startUpload (/mapbox-studio-linux-x64-v0.1.6/resources/app/lib/source.js:682:25)\r\n    at /mapbox-studio-linux-x64-v0.1.6/resources/app/lib/source.js:656:17\r\n\r\n```"},"comment":{"url":"https://api.github.com/repos/mapbox/mapbox-studio/issues/comments/71916588","html_url":"https://github.com/mapbox/mapbox-studio/pull/966#issuecomment-71916588","issue_url":"https://api.github.com/repos/mapbox/mapbox-studio/issues/966","id":71916588,"user":{"login":"wheredoesyourmindgo","id":3316678,"avatar_url":"https://avatars.githubusercontent.com/u/3316678?v=3","gravatar_id":"","url":"https://api.github.com/users/wheredoesyourmindgo","html_url":"https://github.com/wheredoesyourmindgo","followers_url":"https://api.github.com/users/wheredoesyourmindgo/followers","following_url":"https://api.github.com/users/wheredoesyourmindgo/following{/other_user}","gists_url":"https://api.github.com/users/wheredoesyourmindgo/gists{/gist_id}","starred_url":"https://api.github.com/users/wheredoesyourmindgo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wheredoesyourmindgo/subscriptions","organizations_url":"https://api.github.com/users/wheredoesyourmindgo/orgs","repos_url":"https://api.github.com/users/wheredoesyourmindgo/repos","events_url":"https://api.github.com/users/wheredoesyourmindgo/events{/privacy}","received_events_url":"https://api.github.com/users/wheredoesyourmindgo/received_events","type":"User","site_admin":false},"created_at":"2015-01-28T21:10:19Z","updated_at":"2015-01-28T21:10:19Z","body":"\r\nhttps://github.com/zdavkeos Great.  This worked for me!"}}