{"action":"created","comment":{"url":"https://api.github.com/repos/htmlacademy-javascript/111273-code-and-magick/pulls/comments/136641441","pull_request_review_id":60212758,"id":136641441,"diff_hunk":"@@ -102,14 +104,18 @@\n \n     var onArtifactsElementDrop = function (evt) {\n       evt.preventDefault();\n-      if (evt.target.tagName !== 'IMG' && !evt.target.childElementCount) {\n+      if (isEmptyCell(evt.target)) {\n         evt.target.appendChild(draggedItem);\n       }\n \n       artifactsElement.style.outline = '';\n       evt.target.style.background = '';\n     };\n \n+    var isEmptyCell = function (cell) {\n+      return cell.tagName !== 'IMG' && !cell.childElementCount;","path":"js/setup.js","position":25,"original_position":25,"commit_id":"246437acac54777f9efe7013481490182cd1f1de","original_commit_id":"246437acac54777f9efe7013481490182cd1f1de","user":{"login":"leonidlebedev","id":12189820,"avatar_url":"https://avatars3.githubusercontent.com/u/12189820?v=4","gravatar_id":"","url":"https://api.github.com/users/leonidlebedev","html_url":"https://github.com/leonidlebedev","followers_url":"https://api.github.com/users/leonidlebedev/followers","following_url":"https://api.github.com/users/leonidlebedev/following{/other_user}","gists_url":"https://api.github.com/users/leonidlebedev/gists{/gist_id}","starred_url":"https://api.github.com/users/leonidlebedev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leonidlebedev/subscriptions","organizations_url":"https://api.github.com/users/leonidlebedev/orgs","repos_url":"https://api.github.com/users/leonidlebedev/repos","events_url":"https://api.github.com/users/leonidlebedev/events{/privacy}","received_events_url":"https://api.github.com/users/leonidlebedev/received_events","type":"User","site_admin":false},"body":"На самом деле лучше сравнивать со значением, т.е. если у тебя значение содержит число, то лучше сделать так `x !==0`, тоже самое, если у тебя есть массив и надо проверить его длину, ну и т.д. Так просто очевиднее что делает эта штука, хотя здесь видно из названия.\r\n\r\nА ещё тег точно будет заглавными буквами, может лучше использовать метод приведения к строке строчными и сравнивать со значением. Я просто не в курсе разных браузеров и как они возвращают, поэтому здесь может быть подводный камень, от которого стоит перестраховаться.","created_at":"2017-09-01T18:42:42Z","updated_at":"2017-09-01T18:44:41Z","html_url":"https://github.com/htmlacademy-javascript/111273-code-and-magick/pull/7#discussion_r136641441","pull_request_url":"https://api.github.com/repos/htmlacademy-javascript/111273-code-and-magick/pulls/7","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/htmlacademy-javascript/111273-code-and-magick/pulls/comments/136641441"},"html":{"href":"https://github.com/htmlacademy-javascript/111273-code-and-magick/pull/7#discussion_r136641441"},"pull_request":{"href":"https://api.github.com/repos/htmlacademy-javascript/111273-code-and-magick/pulls/7"}}},"pull_request":{"url":"https://api.github.com/repos/htmlacademy-javascript/111273-code-and-magick/pulls/7","id":138915006,"html_url":"https://github.com/htmlacademy-javascript/111273-code-and-magick/pull/7","diff_url":"https://github.com/htmlacademy-javascript/111273-code-and-magick/pull/7.diff","patch_url":"https://github.com/htmlacademy-javascript/111273-code-and-magick/pull/7.patch","issue_url":"https://api.github.com/repos/htmlacademy-javascript/111273-code-and-magick/issues/7","number":7,"state":"open","locked":false,"title":"Учебный проект: обобщение","user":{"login":"Fitz354","id":20779617,"avatar_url":"https://avatars3.githubusercontent.com/u/20779617?v=4","gravatar_id":"","url":"https://api.github.com/users/Fitz354","html_url":"https://github.com/Fitz354","followers_url":"https://api.github.com/users/Fitz354/followers","following_url":"https://api.github.com/users/Fitz354/following{/other_user}","gists_url":"https://api.github.com/users/Fitz354/gists{/gist_id}","starred_url":"https://api.github.com/users/Fitz354/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Fitz354/subscriptions","organizations_url":"https://api.github.com/users/Fitz354/orgs","repos_url":"https://api.github.com/users/Fitz354/repos","events_url":"https://api.github.com/users/Fitz354/events{/privacy}","received_events_url":"https://api.github.com/users/Fitz354/received_events","type":"User","site_admin":false},"body":"\n\n---\n:mortar_board: [Учебный проект: обобщение](https://up.htmlacademy.ru/javascript/10/user/111273/tasks/17)\n\n:boom: https://htmlacademy-javascript.github.io/111273-code-and-magick/7/","created_at":"2017-09-01T15:20:46Z","updated_at":"2017-09-01T18:44:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a70d42960a4d0e362033affff4f74b75b5034497","assignee":{"login":"leonidlebedev","id":12189820,"avatar_url":"https://avatars3.githubusercontent.com/u/12189820?v=4","gravatar_id":"","url":"https://api.github.com/users/leonidlebedev","html_url":"https://github.com/leonidlebedev","followers_url":"https://api.github.com/users/leonidlebedev/followers","following_url":"https://api.github.com/users/leonidlebedev/following{/other_user}","gists_url":"https://api.github.com/users/leonidlebedev/gists{/gist_id}","starred_url":"https://api.github.com/users/leonidlebedev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leonidlebedev/subscriptions","organizations_url":"https://api.github.com/users/leonidlebedev/orgs","repos_url":"https://api.github.com/users/leonidlebedev/repos","events_url":"https://api.github.com/users/leonidlebedev/events{/privacy}","received_events_url":"https://api.github.com/users/leonidlebedev/received_events","type":"User","site_admin":false},"assignees":[{"login":"leonidlebedev","id":12189820,"avatar_url":"https://avatars3.githubusercontent.com/u/12189820?v=4","gravatar_id":"","url":"https://api.github.com/users/leonidlebedev","html_url":"https://github.com/leonidlebedev","followers_url":"https://api.github.com/users/leonidlebedev/followers","following_url":"https://api.github.com/users/leonidlebedev/following{/other_user}","gists_url":"https://api.github.com/users/leonidlebedev/gists{/gist_id}","starred_url":"https://api.github.com/users/leonidlebedev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leonidlebedev/subscriptions","organizations_url":"https://api.github.com/users/leonidlebedev/orgs","repos_url":"https://api.github.com/users/leonidlebedev/repos","events_url":"https://api.github.com/users/leonidlebedev/events{/privacy}","received_events_url":"https://api.github.com/users/leonidlebedev/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/htmlacademy-javascript/111273-code-and-magick/pulls/7/commits","review_comments_url":"https://api.github.com/repos/htmlacademy-javascript/111273-code-and-magick/pulls/7/comments","review_comment_url":"https://api.github.com/repos/htmlacademy-javascript/111273-code-and-magick/pulls/comments{/number}","comments_url":"https://api.github.com/repos/htmlacademy-javascript/111273-code-and-magick/issues/7/comments","statuses_url":"https://api.github.com/repos/htmlacademy-javascript/111273-code-and-magick/statuses/246437acac54777f9efe7013481490182cd1f1de","head":{"label":"Fitz354:module5-task3","ref":"module5-task3","sha":"246437acac54777f9efe7013481490182cd1f1de","user":{"login":"Fitz354","id":20779617,"avatar_url":"https://avatars3.githubusercontent.com/u/20779617?v=4","gravatar_id":"","url":"https://api.github.com/users/Fitz354","html_url":"https://github.com/Fitz354","followers_url":"https://api.github.com/users/Fitz354/followers","following_url":"https://api.github.com/users/Fitz354/following{/other_user}","gists_url":"https://api.github.com/users/Fitz354/gists{/gist_id}","starred_url":"https://api.github.com/users/Fitz354/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Fitz354/subscriptions","organizations_url":"https://api.github.com/users/Fitz354/orgs","repos_url":"https://api.github.com/users/Fitz354/repos","events_url":"https://api.github.com/users/Fitz354/events{/privacy}","received_events_url":"https://api.github.com/users/Fitz354/received_events","type":"User","site_admin":false},"repo":{"id":99727824,"name":"111273-code-and-magick","full_name":"Fitz354/111273-code-and-magick","owner":{"login":"Fitz354","id":20779617,"avatar_url":"https://avatars3.githubusercontent.com/u/20779617?v=4","gravatar_id":"","url":"https://api.github.com/users/Fitz354","html_url":"https://github.com/Fitz354","followers_url":"https://api.github.com/users/Fitz354/followers","following_url":"https://api.github.com/users/Fitz354/following{/other_user}","gists_url":"https://api.github.com/users/Fitz354/gists{/gist_id}","starred_url":"https://api.github.com/users/Fitz354/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Fitz354/subscriptions","organizations_url":"https://api.github.com/users/Fitz354/orgs","repos_url":"https://api.github.com/users/Fitz354/repos","events_url":"https://api.github.com/users/Fitz354/events{/privacy}","received_events_url":"https://api.github.com/users/Fitz354/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Fitz354/111273-code-and-magick","description":"Александр Лозовский","fork":true,"url":"https://api.github.com/repos/Fitz354/111273-code-and-magick","forks_url":"https://api.github.com/repos/Fitz354/111273-code-and-magick/forks","keys_url":"https://api.github.com/repos/Fitz354/111273-code-and-magick/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Fitz354/111273-code-and-magick/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Fitz354/111273-code-and-magick/teams","hooks_url":"https://api.github.com/repos/Fitz354/111273-code-and-magick/hooks","issue_events_url":"https://api.github.com/repos/Fitz354/111273-code-and-magick/issues/events{/number}","events_url":"https://api.github.com/repos/Fitz354/111273-code-and-magick/events","assignees_url":"https://api.github.com/repos/Fitz354/111273-code-and-magick/assignees{/user}","branches_url":"https://api.github.com/repos/Fitz354/111273-code-and-magick/branches{/branch}","tags_url":"https://api.github.com/repos/Fitz354/111273-code-and-magick/tags","blobs_url":"https://api.github.com/repos/Fitz354/111273-code-and-magick/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Fitz354/111273-code-and-magick/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Fitz354/111273-code-and-magick/git/refs{/sha}","trees_url":"https://api.github.com/repos/Fitz354/111273-code-and-magick/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Fitz354/111273-code-and-magick/statuses/{sha}","languages_url":"https://api.github.com/repos/Fitz354/111273-code-and-magick/languages","stargazers_url":"https://api.github.com/repos/Fitz354/111273-code-and-magick/stargazers","contributors_url":"https://api.github.com/repos/Fitz354/111273-code-and-magick/contributors","subscribers_url":"https://api.github.com/repos/Fitz354/111273-code-and-magick/subscribers","subscription_url":"https://api.github.com/repos/Fitz354/111273-code-and-magick/subscription","commits_url":"https://api.github.com/repos/Fitz354/111273-code-and-magick/commits{/sha}","git_commits_url":"https://api.github.com/repos/Fitz354/111273-code-and-magick/git/commits{/sha}","comments_url":"https://api.github.com/repos/Fitz354/111273-code-and-magick/comments{/number}","issue_comment_url":"https://api.github.com/repos/Fitz354/111273-code-and-magick/issues/comments{/number}","contents_url":"https://api.github.com/repos/Fitz354/111273-code-and-magick/contents/{+path}","compare_url":"https://api.github.com/repos/Fitz354/111273-code-and-magick/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Fitz354/111273-code-and-magick/merges","archive_url":"https://api.github.com/repos/Fitz354/111273-code-and-magick/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Fitz354/111273-code-and-magick/downloads","issues_url":"https://api.github.com/repos/Fitz354/111273-code-and-magick/issues{/number}","pulls_url":"https://api.github.com/repos/Fitz354/111273-code-and-magick/pulls{/number}","milestones_url":"https://api.github.com/repos/Fitz354/111273-code-and-magick/milestones{/number}","notifications_url":"https://api.github.com/repos/Fitz354/111273-code-and-magick/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Fitz354/111273-code-and-magick/labels{/name}","releases_url":"https://api.github.com/repos/Fitz354/111273-code-and-magick/releases{/id}","deployments_url":"https://api.github.com/repos/Fitz354/111273-code-and-magick/deployments","created_at":"2017-08-08T19:16:32Z","updated_at":"2017-08-08T19:16:34Z","pushed_at":"2017-09-01T15:19:04Z","git_url":"git://github.com/Fitz354/111273-code-and-magick.git","ssh_url":"git@github.com:Fitz354/111273-code-and-magick.git","clone_url":"https://github.com/Fitz354/111273-code-and-magick.git","svn_url":"https://github.com/Fitz354/111273-code-and-magick","homepage":null,"size":1092,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":false,"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":"htmlacademy-javascript:master","ref":"master","sha":"f8c70652a642b3c781345c922f9c06e2170a7973","user":{"login":"htmlacademy-javascript","id":14179712,"avatar_url":"https://avatars2.githubusercontent.com/u/14179712?v=4","gravatar_id":"","url":"https://api.github.com/users/htmlacademy-javascript","html_url":"https://github.com/htmlacademy-javascript","followers_url":"https://api.github.com/users/htmlacademy-javascript/followers","following_url":"https://api.github.com/users/htmlacademy-javascript/following{/other_user}","gists_url":"https://api.github.com/users/htmlacademy-javascript/gists{/gist_id}","starred_url":"https://api.github.com/users/htmlacademy-javascript/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/htmlacademy-javascript/subscriptions","organizations_url":"https://api.github.com/users/htmlacademy-javascript/orgs","repos_url":"https://api.github.com/users/htmlacademy-javascript/repos","events_url":"https://api.github.com/users/htmlacademy-javascript/events{/privacy}","received_events_url":"https://api.github.com/users/htmlacademy-javascript/received_events","type":"Organization","site_admin":false},"repo":{"id":99727805,"name":"111273-code-and-magick","full_name":"htmlacademy-javascript/111273-code-and-magick","owner":{"login":"htmlacademy-javascript","id":14179712,"avatar_url":"https://avatars2.githubusercontent.com/u/14179712?v=4","gravatar_id":"","url":"https://api.github.com/users/htmlacademy-javascript","html_url":"https://github.com/htmlacademy-javascript","followers_url":"https://api.github.com/users/htmlacademy-javascript/followers","following_url":"https://api.github.com/users/htmlacademy-javascript/following{/other_user}","gists_url":"https://api.github.com/users/htmlacademy-javascript/gists{/gist_id}","starred_url":"https://api.github.com/users/htmlacademy-javascript/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/htmlacademy-javascript/subscriptions","organizations_url":"https://api.github.com/users/htmlacademy-javascript/orgs","repos_url":"https://api.github.com/users/htmlacademy-javascript/repos","events_url":"https://api.github.com/users/htmlacademy-javascript/events{/privacy}","received_events_url":"https://api.github.com/users/htmlacademy-javascript/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/htmlacademy-javascript/111273-code-and-magick","description":"Александр Лозовский","fork":false,"url":"https://api.github.com/repos/htmlacademy-javascript/111273-code-and-magick","forks_url":"https://api.github.com/repos/htmlacademy-javascript/111273-code-and-magick/forks","keys_url":"https://api.github.com/repos/htmlacademy-javascript/111273-code-and-magick/keys{/key_id}","collaborators_url":"https://api.github.com/repos/htmlacademy-javascript/111273-code-and-magick/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/htmlacademy-javascript/111273-code-and-magick/teams","hooks_url":"https://api.github.com/repos/htmlacademy-javascript/111273-code-and-magick/hooks","issue_events_url":"https://api.github.com/repos/htmlacademy-javascript/111273-code-and-magick/issues/events{/number}","events_url":"https://api.github.com/repos/htmlacademy-javascript/111273-code-and-magick/events","assignees_url":"https://api.github.com/repos/htmlacademy-javascript/111273-code-and-magick/assignees{/user}","branches_url":"https://api.github.com/repos/htmlacademy-javascript/111273-code-and-magick/branches{/branch}","tags_url":"https://api.github.com/repos/htmlacademy-javascript/111273-code-and-magick/tags","blobs_url":"https://api.github.com/repos/htmlacademy-javascript/111273-code-and-magick/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/htmlacademy-javascript/111273-code-and-magick/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/htmlacademy-javascript/111273-code-and-magick/git/refs{/sha}","trees_url":"https://api.github.com/repos/htmlacademy-javascript/111273-code-and-magick/git/trees{/sha}","statuses_url":"https://api.github.com/repos/htmlacademy-javascript/111273-code-and-magick/statuses/{sha}","languages_url":"https://api.github.com/repos/htmlacademy-javascript/111273-code-and-magick/languages","stargazers_url":"https://api.github.com/repos/htmlacademy-javascript/111273-code-and-magick/stargazers","contributors_url":"https://api.github.com/repos/htmlacademy-javascript/111273-code-and-magick/contributors","subscribers_url":"https://api.github.com/repos/htmlacademy-javascript/111273-code-and-magick/subscribers","subscription_url":"https://api.github.com/repos/htmlacademy-javascript/111273-code-and-magick/subscription","commits_url":"https://api.github.com/repos/htmlacademy-javascript/111273-code-and-magick/commits{/sha}","git_commits_url":"https://api.github.com/repos/htmlacademy-javascript/111273-code-and-magick/git/commits{/sha}","comments_url":"https://api.github.com/repos/htmlacademy-javascript/111273-code-and-magick/comments{/number}","issue_comment_url":"https://api.github.com/repos/htmlacademy-javascript/111273-code-and-magick/issues/comments{/number}","contents_url":"https://api.github.com/repos/htmlacademy-javascript/111273-code-and-magick/contents/{+path}","compare_url":"https://api.github.com/repos/htmlacademy-javascript/111273-code-and-magick/compare/{base}...{head}","merges_url":"https://api.github.com/repos/htmlacademy-javascript/111273-code-and-magick/merges","archive_url":"https://api.github.com/repos/htmlacademy-javascript/111273-code-and-magick/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/htmlacademy-javascript/111273-code-and-magick/downloads","issues_url":"https://api.github.com/repos/htmlacademy-javascript/111273-code-and-magick/issues{/number}","pulls_url":"https://api.github.com/repos/htmlacademy-javascript/111273-code-and-magick/pulls{/number}","milestones_url":"https://api.github.com/repos/htmlacademy-javascript/111273-code-and-magick/milestones{/number}","notifications_url":"https://api.github.com/repos/htmlacademy-javascript/111273-code-and-magick/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/htmlacademy-javascript/111273-code-and-magick/labels{/name}","releases_url":"https://api.github.com/repos/htmlacademy-javascript/111273-code-and-magick/releases{/id}","deployments_url":"https://api.github.com/repos/htmlacademy-javascript/111273-code-and-magick/deployments","created_at":"2017-08-08T19:16:19Z","updated_at":"2017-08-09T21:47:14Z","pushed_at":"2017-09-01T15:21:09Z","git_url":"git://github.com/htmlacademy-javascript/111273-code-and-magick.git","ssh_url":"git@github.com:htmlacademy-javascript/111273-code-and-magick.git","clone_url":"https://github.com/htmlacademy-javascript/111273-code-and-magick.git","svn_url":"https://github.com/htmlacademy-javascript/111273-code-and-magick","homepage":"https://github.com/Fitz354/111273-code-and-magick","size":1105,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":false,"has_wiki":false,"has_pages":true,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/htmlacademy-javascript/111273-code-and-magick/pulls/7"},"html":{"href":"https://github.com/htmlacademy-javascript/111273-code-and-magick/pull/7"},"issue":{"href":"https://api.github.com/repos/htmlacademy-javascript/111273-code-and-magick/issues/7"},"comments":{"href":"https://api.github.com/repos/htmlacademy-javascript/111273-code-and-magick/issues/7/comments"},"review_comments":{"href":"https://api.github.com/repos/htmlacademy-javascript/111273-code-and-magick/pulls/7/comments"},"review_comment":{"href":"https://api.github.com/repos/htmlacademy-javascript/111273-code-and-magick/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/htmlacademy-javascript/111273-code-and-magick/pulls/7/commits"},"statuses":{"href":"https://api.github.com/repos/htmlacademy-javascript/111273-code-and-magick/statuses/246437acac54777f9efe7013481490182cd1f1de"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"leonidlebedev"}}