{"action":"created","issue":{"url":"https://api.github.com/repos/substance/substance/issues/149","labels_url":"https://api.github.com/repos/substance/substance/issues/149/labels{/name}","comments_url":"https://api.github.com/repos/substance/substance/issues/149/comments","events_url":"https://api.github.com/repos/substance/substance/issues/149/events","html_url":"https://github.com/substance/substance/issues/149","id":111973124,"number":149,"title":"Inserting nodes with no components breaks","user":{"login":"michael","id":2931,"avatar_url":"https://avatars.githubusercontent.com/u/2931?v=3","gravatar_id":"","url":"https://api.github.com/users/michael","html_url":"https://github.com/michael","followers_url":"https://api.github.com/users/michael/followers","following_url":"https://api.github.com/users/michael/following{/other_user}","gists_url":"https://api.github.com/users/michael/gists{/gist_id}","starred_url":"https://api.github.com/users/michael/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michael/subscriptions","organizations_url":"https://api.github.com/users/michael/orgs","repos_url":"https://api.github.com/users/michael/repos","events_url":"https://api.github.com/users/michael/events{/privacy}","received_events_url":"https://api.github.com/users/michael/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/substance/substance/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":{"login":"oliver----","id":284099,"avatar_url":"https://avatars.githubusercontent.com/u/284099?v=3","gravatar_id":"","url":"https://api.github.com/users/oliver----","html_url":"https://github.com/oliver----","followers_url":"https://api.github.com/users/oliver----/followers","following_url":"https://api.github.com/users/oliver----/following{/other_user}","gists_url":"https://api.github.com/users/oliver----/gists{/gist_id}","starred_url":"https://api.github.com/users/oliver----/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oliver----/subscriptions","organizations_url":"https://api.github.com/users/oliver----/orgs","repos_url":"https://api.github.com/users/oliver----/repos","events_url":"https://api.github.com/users/oliver----/events{/privacy}","received_events_url":"https://api.github.com/users/oliver----/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/substance/substance/milestones/3","html_url":"https://github.com/substance/substance/milestones/Beta%203","labels_url":"https://api.github.com/repos/substance/substance/milestones/3/labels","id":1323787,"number":3,"title":"Beta 3","description":"","creator":{"login":"michael","id":2931,"avatar_url":"https://avatars.githubusercontent.com/u/2931?v=3","gravatar_id":"","url":"https://api.github.com/users/michael","html_url":"https://github.com/michael","followers_url":"https://api.github.com/users/michael/followers","following_url":"https://api.github.com/users/michael/following{/other_user}","gists_url":"https://api.github.com/users/michael/gists{/gist_id}","starred_url":"https://api.github.com/users/michael/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michael/subscriptions","organizations_url":"https://api.github.com/users/michael/orgs","repos_url":"https://api.github.com/users/michael/repos","events_url":"https://api.github.com/users/michael/events{/privacy}","received_events_url":"https://api.github.com/users/michael/received_events","type":"User","site_admin":false},"open_issues":7,"closed_issues":16,"state":"open","created_at":"2015-09-25T13:17:52Z","updated_at":"2015-12-17T18:54:03Z","due_on":null,"closed_at":null},"comments":4,"created_at":"2015-10-17T16:53:50Z","updated_at":"2015-12-17T18:54:36Z","closed_at":null,"body":"Reproduce:\r\n\r\n```js\r\n      var img = tx.create({\r\n        id: Substance.uuid(\"image\"),\r\n        type: \"image\",\r\n        src: 'path/to/image.png',\r\n        previewSrc: 'path/to/image.png'\r\n      });\r\n      \r\n      return surface.insertNode(tx, { selection: args.selection, node: img });\r\n```\r\n\r\nImage does not have any editable areas (=components) but this is assumed in Container._handleInsert.\r\n\r\nIt fails here because `_getNodeComponents` returns an empty array and causes `_insertComponentsAt` to crash.\r\n\r\n![image](https://cloud.githubusercontent.com/assets/2931/10560079/266bbc3c-7500-11e5-9e7b-e0858f5c1cf4.png)"},"comment":{"url":"https://api.github.com/repos/substance/substance/issues/comments/165547066","html_url":"https://github.com/substance/substance/issues/149#issuecomment-165547066","issue_url":"https://api.github.com/repos/substance/substance/issues/149","id":165547066,"user":{"login":"michael","id":2931,"avatar_url":"https://avatars.githubusercontent.com/u/2931?v=3","gravatar_id":"","url":"https://api.github.com/users/michael","html_url":"https://github.com/michael","followers_url":"https://api.github.com/users/michael/followers","following_url":"https://api.github.com/users/michael/following{/other_user}","gists_url":"https://api.github.com/users/michael/gists{/gist_id}","starred_url":"https://api.github.com/users/michael/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michael/subscriptions","organizations_url":"https://api.github.com/users/michael/orgs","repos_url":"https://api.github.com/users/michael/repos","events_url":"https://api.github.com/users/michael/events{/privacy}","received_events_url":"https://api.github.com/users/michael/received_events","type":"User","site_admin":false},"created_at":"2015-12-17T18:54:36Z","updated_at":"2015-12-17T18:54:36Z","body":"I assume this is no longer an issue... will check."}}