{"action":"closed","number":264,"pull_request":{"url":"https://api.github.com/repos/bevacqua/dragula/pulls/264","id":51321662,"html_url":"https://github.com/bevacqua/dragula/pull/264","diff_url":"https://github.com/bevacqua/dragula/pull/264.diff","patch_url":"https://github.com/bevacqua/dragula/pull/264.patch","issue_url":"https://api.github.com/repos/bevacqua/dragula/issues/264","number":264,"state":"closed","locked":false,"title":"Fixes body reference error","user":{"login":"netil","id":2178435,"avatar_url":"https://avatars.githubusercontent.com/u/2178435?v=3","gravatar_id":"","url":"https://api.github.com/users/netil","html_url":"https://github.com/netil","followers_url":"https://api.github.com/users/netil/followers","following_url":"https://api.github.com/users/netil/following{/other_user}","gists_url":"https://api.github.com/users/netil/gists{/gist_id}","starred_url":"https://api.github.com/users/netil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/netil/subscriptions","organizations_url":"https://api.github.com/users/netil/orgs","repos_url":"https://api.github.com/users/netil/repos","events_url":"https://api.github.com/users/netil/events{/privacy}","received_events_url":"https://api.github.com/users/netil/received_events","type":"User","site_admin":false},"body":"When dragula is included in the header, the body variable in the closure can't have body reference\r\ndue to DOM haven't constructed yet.\r\nTo solve that issue, should check body and assign if not.\r\n\r\nI made simple demo to check out that :\r\n- appendChild error due to the body is null : \r\n  https://output.jsbin.com/juramebimo/1\r\n\r\n- works fine, because body referes document.body :\r\n  https://output.jsbin.com/vadeweyive/1\r\n\r\n#262 issue occurs because dragula was included in the header.","created_at":"2015-11-20T06:16:24Z","updated_at":"2016-02-05T14:17:45Z","closed_at":"2016-02-05T14:17:45Z","merged_at":null,"merge_commit_sha":"77ec3282efd7633d2978dd7bb451b5b84708c141","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/bevacqua/dragula/pulls/264/commits","review_comments_url":"https://api.github.com/repos/bevacqua/dragula/pulls/264/comments","review_comment_url":"https://api.github.com/repos/bevacqua/dragula/pulls/comments{/number}","comments_url":"https://api.github.com/repos/bevacqua/dragula/issues/264/comments","statuses_url":"https://api.github.com/repos/bevacqua/dragula/statuses/7ad6db4aa24f6f33a12b72562e6c1449774e7873","head":{"label":"netil:bodyRef","ref":"bodyRef","sha":"7ad6db4aa24f6f33a12b72562e6c1449774e7873","user":{"login":"netil","id":2178435,"avatar_url":"https://avatars.githubusercontent.com/u/2178435?v=3","gravatar_id":"","url":"https://api.github.com/users/netil","html_url":"https://github.com/netil","followers_url":"https://api.github.com/users/netil/followers","following_url":"https://api.github.com/users/netil/following{/other_user}","gists_url":"https://api.github.com/users/netil/gists{/gist_id}","starred_url":"https://api.github.com/users/netil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/netil/subscriptions","organizations_url":"https://api.github.com/users/netil/orgs","repos_url":"https://api.github.com/users/netil/repos","events_url":"https://api.github.com/users/netil/events{/privacy}","received_events_url":"https://api.github.com/users/netil/received_events","type":"User","site_admin":false},"repo":{"id":46542029,"name":"dragula","full_name":"netil/dragula","owner":{"login":"netil","id":2178435,"avatar_url":"https://avatars.githubusercontent.com/u/2178435?v=3","gravatar_id":"","url":"https://api.github.com/users/netil","html_url":"https://github.com/netil","followers_url":"https://api.github.com/users/netil/followers","following_url":"https://api.github.com/users/netil/following{/other_user}","gists_url":"https://api.github.com/users/netil/gists{/gist_id}","starred_url":"https://api.github.com/users/netil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/netil/subscriptions","organizations_url":"https://api.github.com/users/netil/orgs","repos_url":"https://api.github.com/users/netil/repos","events_url":"https://api.github.com/users/netil/events{/privacy}","received_events_url":"https://api.github.com/users/netil/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/netil/dragula","description":":ok_hand: Drag and drop so simple it hurts","fork":true,"url":"https://api.github.com/repos/netil/dragula","forks_url":"https://api.github.com/repos/netil/dragula/forks","keys_url":"https://api.github.com/repos/netil/dragula/keys{/key_id}","collaborators_url":"https://api.github.com/repos/netil/dragula/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/netil/dragula/teams","hooks_url":"https://api.github.com/repos/netil/dragula/hooks","issue_events_url":"https://api.github.com/repos/netil/dragula/issues/events{/number}","events_url":"https://api.github.com/repos/netil/dragula/events","assignees_url":"https://api.github.com/repos/netil/dragula/assignees{/user}","branches_url":"https://api.github.com/repos/netil/dragula/branches{/branch}","tags_url":"https://api.github.com/repos/netil/dragula/tags","blobs_url":"https://api.github.com/repos/netil/dragula/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/netil/dragula/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/netil/dragula/git/refs{/sha}","trees_url":"https://api.github.com/repos/netil/dragula/git/trees{/sha}","statuses_url":"https://api.github.com/repos/netil/dragula/statuses/{sha}","languages_url":"https://api.github.com/repos/netil/dragula/languages","stargazers_url":"https://api.github.com/repos/netil/dragula/stargazers","contributors_url":"https://api.github.com/repos/netil/dragula/contributors","subscribers_url":"https://api.github.com/repos/netil/dragula/subscribers","subscription_url":"https://api.github.com/repos/netil/dragula/subscription","commits_url":"https://api.github.com/repos/netil/dragula/commits{/sha}","git_commits_url":"https://api.github.com/repos/netil/dragula/git/commits{/sha}","comments_url":"https://api.github.com/repos/netil/dragula/comments{/number}","issue_comment_url":"https://api.github.com/repos/netil/dragula/issues/comments{/number}","contents_url":"https://api.github.com/repos/netil/dragula/contents/{+path}","compare_url":"https://api.github.com/repos/netil/dragula/compare/{base}...{head}","merges_url":"https://api.github.com/repos/netil/dragula/merges","archive_url":"https://api.github.com/repos/netil/dragula/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/netil/dragula/downloads","issues_url":"https://api.github.com/repos/netil/dragula/issues{/number}","pulls_url":"https://api.github.com/repos/netil/dragula/pulls{/number}","milestones_url":"https://api.github.com/repos/netil/dragula/milestones{/number}","notifications_url":"https://api.github.com/repos/netil/dragula/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/netil/dragula/labels{/name}","releases_url":"https://api.github.com/repos/netil/dragula/releases{/id}","deployments_url":"https://api.github.com/repos/netil/dragula/deployments","created_at":"2015-11-20T05:41:25Z","updated_at":"2015-12-07T08:53:26Z","pushed_at":"2015-11-20T06:36:27Z","git_url":"git://github.com/netil/dragula.git","ssh_url":"git@github.com:netil/dragula.git","clone_url":"https://github.com/netil/dragula.git","svn_url":"https://github.com/netil/dragula","homepage":"http://bevacqua.github.io/dragula/","size":1565,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"bevacqua:master","ref":"master","sha":"326f802596957aae2cbf4600da87c62982b930f8","user":{"login":"bevacqua","id":934293,"avatar_url":"https://avatars.githubusercontent.com/u/934293?v=3","gravatar_id":"","url":"https://api.github.com/users/bevacqua","html_url":"https://github.com/bevacqua","followers_url":"https://api.github.com/users/bevacqua/followers","following_url":"https://api.github.com/users/bevacqua/following{/other_user}","gists_url":"https://api.github.com/users/bevacqua/gists{/gist_id}","starred_url":"https://api.github.com/users/bevacqua/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bevacqua/subscriptions","organizations_url":"https://api.github.com/users/bevacqua/orgs","repos_url":"https://api.github.com/users/bevacqua/repos","events_url":"https://api.github.com/users/bevacqua/events{/privacy}","received_events_url":"https://api.github.com/users/bevacqua/received_events","type":"User","site_admin":false},"repo":{"id":33895378,"name":"dragula","full_name":"bevacqua/dragula","owner":{"login":"bevacqua","id":934293,"avatar_url":"https://avatars.githubusercontent.com/u/934293?v=3","gravatar_id":"","url":"https://api.github.com/users/bevacqua","html_url":"https://github.com/bevacqua","followers_url":"https://api.github.com/users/bevacqua/followers","following_url":"https://api.github.com/users/bevacqua/following{/other_user}","gists_url":"https://api.github.com/users/bevacqua/gists{/gist_id}","starred_url":"https://api.github.com/users/bevacqua/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bevacqua/subscriptions","organizations_url":"https://api.github.com/users/bevacqua/orgs","repos_url":"https://api.github.com/users/bevacqua/repos","events_url":"https://api.github.com/users/bevacqua/events{/privacy}","received_events_url":"https://api.github.com/users/bevacqua/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bevacqua/dragula","description":":ok_hand: Drag and drop so simple it hurts","fork":false,"url":"https://api.github.com/repos/bevacqua/dragula","forks_url":"https://api.github.com/repos/bevacqua/dragula/forks","keys_url":"https://api.github.com/repos/bevacqua/dragula/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bevacqua/dragula/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bevacqua/dragula/teams","hooks_url":"https://api.github.com/repos/bevacqua/dragula/hooks","issue_events_url":"https://api.github.com/repos/bevacqua/dragula/issues/events{/number}","events_url":"https://api.github.com/repos/bevacqua/dragula/events","assignees_url":"https://api.github.com/repos/bevacqua/dragula/assignees{/user}","branches_url":"https://api.github.com/repos/bevacqua/dragula/branches{/branch}","tags_url":"https://api.github.com/repos/bevacqua/dragula/tags","blobs_url":"https://api.github.com/repos/bevacqua/dragula/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bevacqua/dragula/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bevacqua/dragula/git/refs{/sha}","trees_url":"https://api.github.com/repos/bevacqua/dragula/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bevacqua/dragula/statuses/{sha}","languages_url":"https://api.github.com/repos/bevacqua/dragula/languages","stargazers_url":"https://api.github.com/repos/bevacqua/dragula/stargazers","contributors_url":"https://api.github.com/repos/bevacqua/dragula/contributors","subscribers_url":"https://api.github.com/repos/bevacqua/dragula/subscribers","subscription_url":"https://api.github.com/repos/bevacqua/dragula/subscription","commits_url":"https://api.github.com/repos/bevacqua/dragula/commits{/sha}","git_commits_url":"https://api.github.com/repos/bevacqua/dragula/git/commits{/sha}","comments_url":"https://api.github.com/repos/bevacqua/dragula/comments{/number}","issue_comment_url":"https://api.github.com/repos/bevacqua/dragula/issues/comments{/number}","contents_url":"https://api.github.com/repos/bevacqua/dragula/contents/{+path}","compare_url":"https://api.github.com/repos/bevacqua/dragula/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bevacqua/dragula/merges","archive_url":"https://api.github.com/repos/bevacqua/dragula/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bevacqua/dragula/downloads","issues_url":"https://api.github.com/repos/bevacqua/dragula/issues{/number}","pulls_url":"https://api.github.com/repos/bevacqua/dragula/pulls{/number}","milestones_url":"https://api.github.com/repos/bevacqua/dragula/milestones{/number}","notifications_url":"https://api.github.com/repos/bevacqua/dragula/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bevacqua/dragula/labels{/name}","releases_url":"https://api.github.com/repos/bevacqua/dragula/releases{/id}","deployments_url":"https://api.github.com/repos/bevacqua/dragula/deployments","created_at":"2015-04-13T21:35:38Z","updated_at":"2016-02-05T13:42:16Z","pushed_at":"2016-02-03T06:01:12Z","git_url":"git://github.com/bevacqua/dragula.git","ssh_url":"git@github.com:bevacqua/dragula.git","clone_url":"https://github.com/bevacqua/dragula.git","svn_url":"https://github.com/bevacqua/dragula","homepage":"http://bevacqua.github.io/dragula/","size":2167,"stargazers_count":11179,"watchers_count":11179,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":638,"mirror_url":null,"open_issues_count":18,"forks":638,"open_issues":18,"watchers":11179,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/bevacqua/dragula/pulls/264"},"html":{"href":"https://github.com/bevacqua/dragula/pull/264"},"issue":{"href":"https://api.github.com/repos/bevacqua/dragula/issues/264"},"comments":{"href":"https://api.github.com/repos/bevacqua/dragula/issues/264/comments"},"review_comments":{"href":"https://api.github.com/repos/bevacqua/dragula/pulls/264/comments"},"review_comment":{"href":"https://api.github.com/repos/bevacqua/dragula/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/bevacqua/dragula/pulls/264/commits"},"statuses":{"href":"https://api.github.com/repos/bevacqua/dragula/statuses/7ad6db4aa24f6f33a12b72562e6c1449774e7873"}},"merged":false,"mergeable":true,"mergeable_state":"clean","merged_by":null,"comments":1,"review_comments":0,"commits":2,"additions":2,"deletions":0,"changed_files":1}}