{"action":"created","issue":{"url":"https://api.github.com/repos/google/blockly/issues/142","labels_url":"https://api.github.com/repos/google/blockly/issues/142/labels{/name}","comments_url":"https://api.github.com/repos/google/blockly/issues/142/comments","events_url":"https://api.github.com/repos/google/blockly/issues/142/events","html_url":"https://github.com/google/blockly/issues/142","id":98194657,"number":142,"title":"code generation breaks for blocks with empty next statements","user":{"login":"yoderjen","id":10271662,"avatar_url":"https://avatars.githubusercontent.com/u/10271662?v=3","gravatar_id":"","url":"https://api.github.com/users/yoderjen","html_url":"https://github.com/yoderjen","followers_url":"https://api.github.com/users/yoderjen/followers","following_url":"https://api.github.com/users/yoderjen/following{/other_user}","gists_url":"https://api.github.com/users/yoderjen/gists{/gist_id}","starred_url":"https://api.github.com/users/yoderjen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yoderjen/subscriptions","organizations_url":"https://api.github.com/users/yoderjen/orgs","repos_url":"https://api.github.com/users/yoderjen/repos","events_url":"https://api.github.com/users/yoderjen/events{/privacy}","received_events_url":"https://api.github.com/users/yoderjen/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-07-30T15:14:13Z","updated_at":"2015-07-30T15:32:40Z","closed_at":"2015-07-30T15:32:40Z","body":"Found this playing with the \"code\" demo I downloaded yesterday.  If you have a block that can have a statement attached to it (like the if block, the loop blocks, the function blocks), but the statement block is empty (just pull an if block and don't add anything to it, for example) , blockly/code/generator.js  fails at line 244\r\n  goog.asserts.assertString(code,\r\n      'Expecting code from statement block \"%s\".', targetBlock.type);\r\nbecause it is trying to get the \"type\" of targetBlock, which does not exist, so you get the error\r\n\r\n     Uncaught TypeError: Cannot read property 'type' of null\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/google/blockly/issues/comments/126371692","html_url":"https://github.com/google/blockly/issues/142#issuecomment-126371692","issue_url":"https://api.github.com/repos/google/blockly/issues/142","id":126371692,"user":{"login":"NeilFraser","id":250480,"avatar_url":"https://avatars.githubusercontent.com/u/250480?v=3","gravatar_id":"","url":"https://api.github.com/users/NeilFraser","html_url":"https://github.com/NeilFraser","followers_url":"https://api.github.com/users/NeilFraser/followers","following_url":"https://api.github.com/users/NeilFraser/following{/other_user}","gists_url":"https://api.github.com/users/NeilFraser/gists{/gist_id}","starred_url":"https://api.github.com/users/NeilFraser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NeilFraser/subscriptions","organizations_url":"https://api.github.com/users/NeilFraser/orgs","repos_url":"https://api.github.com/users/NeilFraser/repos","events_url":"https://api.github.com/users/NeilFraser/events{/privacy}","received_events_url":"https://api.github.com/users/NeilFraser/received_events","type":"User","site_admin":false},"created_at":"2015-07-30T15:32:40Z","updated_at":"2015-07-30T15:32:40Z","body":"Fixed.  Thanks!"}}