{"action":"created","comment":{"url":"https://api.github.com/repos/js-htmlacademy/37104-code-and-magick/pulls/comments/48259195","id":48259195,"diff_hunk":"@@ -31,31 +20,27 @@ define([ //eslint-disable-line no-undef\n \n   /**\n    * Проверяет заполненность поля (в  него должен быть\n-   * введен хотя бы один символ)\n-   * @param element\n-   * @returns {boolean}\n+   * введен хотя бы один символ).\n+   * @param {Element} element\n+   * @return {boolean}\n    */\n   function checkRequiredField(element) {\n-    if (typeof element !== 'string') {\n-      return element.value.length ? true : false;\n-    } else {\n-      return element.length ? true : false;\n-    }\n+    return (typeof element === 'object') ?\n+       element.value.length !== 0 : element.length !== 0;","path":"js/form.js","position":49,"original_position":49,"commit_id":"f0d10ff8214253ae1fe01c0815df3fb02b72c36c","original_commit_id":"f0d10ff8214253ae1fe01c0815df3fb02b72c36c","user":{"login":"AndrewDubovtsev","id":10465484,"avatar_url":"https://avatars.githubusercontent.com/u/10465484?v=3","gravatar_id":"","url":"https://api.github.com/users/AndrewDubovtsev","html_url":"https://github.com/AndrewDubovtsev","followers_url":"https://api.github.com/users/AndrewDubovtsev/followers","following_url":"https://api.github.com/users/AndrewDubovtsev/following{/other_user}","gists_url":"https://api.github.com/users/AndrewDubovtsev/gists{/gist_id}","starred_url":"https://api.github.com/users/AndrewDubovtsev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AndrewDubovtsev/subscriptions","organizations_url":"https://api.github.com/users/AndrewDubovtsev/orgs","repos_url":"https://api.github.com/users/AndrewDubovtsev/repos","events_url":"https://api.github.com/users/AndrewDubovtsev/events{/privacy}","received_events_url":"https://api.github.com/users/AndrewDubovtsev/received_events","type":"User","site_admin":false},"body":"Как уже говорил, у меня element.hasOwnProperty('value') возвращает false, так что не знаю, как модифицировать, пытался найти информацию по теме, нашел только это\r\nhttps://developers.google.com/web/updates/2015/04/DOM-attributes-now-on-the-prototype-chain\r\nгде, в общем-то, это подтверждается. ","created_at":"2015-12-22T14:49:04Z","updated_at":"2015-12-22T14:49:04Z","html_url":"https://github.com/js-htmlacademy/37104-code-and-magick/pull/21#discussion_r48259195","pull_request_url":"https://api.github.com/repos/js-htmlacademy/37104-code-and-magick/pulls/21","_links":{"self":{"href":"https://api.github.com/repos/js-htmlacademy/37104-code-and-magick/pulls/comments/48259195"},"html":{"href":"https://github.com/js-htmlacademy/37104-code-and-magick/pull/21#discussion_r48259195"},"pull_request":{"href":"https://api.github.com/repos/js-htmlacademy/37104-code-and-magick/pulls/21"}}},"pull_request":{"url":"https://api.github.com/repos/js-htmlacademy/37104-code-and-magick/pulls/21","id":54206376,"html_url":"https://github.com/js-htmlacademy/37104-code-and-magick/pull/21","diff_url":"https://github.com/js-htmlacademy/37104-code-and-magick/pull/21.diff","patch_url":"https://github.com/js-htmlacademy/37104-code-and-magick/pull/21.patch","issue_url":"https://api.github.com/repos/js-htmlacademy/37104-code-and-magick/issues/21","number":21,"state":"open","locked":false,"title":"Corrections","user":{"login":"AndrewDubovtsev","id":10465484,"avatar_url":"https://avatars.githubusercontent.com/u/10465484?v=3","gravatar_id":"","url":"https://api.github.com/users/AndrewDubovtsev","html_url":"https://github.com/AndrewDubovtsev","followers_url":"https://api.github.com/users/AndrewDubovtsev/followers","following_url":"https://api.github.com/users/AndrewDubovtsev/following{/other_user}","gists_url":"https://api.github.com/users/AndrewDubovtsev/gists{/gist_id}","starred_url":"https://api.github.com/users/AndrewDubovtsev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AndrewDubovtsev/subscriptions","organizations_url":"https://api.github.com/users/AndrewDubovtsev/orgs","repos_url":"https://api.github.com/users/AndrewDubovtsev/repos","events_url":"https://api.github.com/users/AndrewDubovtsev/events{/privacy}","received_events_url":"https://api.github.com/users/AndrewDubovtsev/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-12-20T19:50:18Z","updated_at":"2015-12-22T14:49:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9171e7bdb00f1d428393075996245c749cc6a40c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/js-htmlacademy/37104-code-and-magick/pulls/21/commits","review_comments_url":"https://api.github.com/repos/js-htmlacademy/37104-code-and-magick/pulls/21/comments","review_comment_url":"https://api.github.com/repos/js-htmlacademy/37104-code-and-magick/pulls/comments{/number}","comments_url":"https://api.github.com/repos/js-htmlacademy/37104-code-and-magick/issues/21/comments","statuses_url":"https://api.github.com/repos/js-htmlacademy/37104-code-and-magick/statuses/f0d10ff8214253ae1fe01c0815df3fb02b72c36c","head":{"label":"AndrewDubovtsev:corrections","ref":"corrections","sha":"f0d10ff8214253ae1fe01c0815df3fb02b72c36c","user":{"login":"AndrewDubovtsev","id":10465484,"avatar_url":"https://avatars.githubusercontent.com/u/10465484?v=3","gravatar_id":"","url":"https://api.github.com/users/AndrewDubovtsev","html_url":"https://github.com/AndrewDubovtsev","followers_url":"https://api.github.com/users/AndrewDubovtsev/followers","following_url":"https://api.github.com/users/AndrewDubovtsev/following{/other_user}","gists_url":"https://api.github.com/users/AndrewDubovtsev/gists{/gist_id}","starred_url":"https://api.github.com/users/AndrewDubovtsev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AndrewDubovtsev/subscriptions","organizations_url":"https://api.github.com/users/AndrewDubovtsev/orgs","repos_url":"https://api.github.com/users/AndrewDubovtsev/repos","events_url":"https://api.github.com/users/AndrewDubovtsev/events{/privacy}","received_events_url":"https://api.github.com/users/AndrewDubovtsev/received_events","type":"User","site_admin":false},"repo":{"id":46367463,"name":"37104-code-and-magick","full_name":"AndrewDubovtsev/37104-code-and-magick","owner":{"login":"AndrewDubovtsev","id":10465484,"avatar_url":"https://avatars.githubusercontent.com/u/10465484?v=3","gravatar_id":"","url":"https://api.github.com/users/AndrewDubovtsev","html_url":"https://github.com/AndrewDubovtsev","followers_url":"https://api.github.com/users/AndrewDubovtsev/followers","following_url":"https://api.github.com/users/AndrewDubovtsev/following{/other_user}","gists_url":"https://api.github.com/users/AndrewDubovtsev/gists{/gist_id}","starred_url":"https://api.github.com/users/AndrewDubovtsev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AndrewDubovtsev/subscriptions","organizations_url":"https://api.github.com/users/AndrewDubovtsev/orgs","repos_url":"https://api.github.com/users/AndrewDubovtsev/repos","events_url":"https://api.github.com/users/AndrewDubovtsev/events{/privacy}","received_events_url":"https://api.github.com/users/AndrewDubovtsev/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/AndrewDubovtsev/37104-code-and-magick","description":"Андрей Дубовцев","fork":true,"url":"https://api.github.com/repos/AndrewDubovtsev/37104-code-and-magick","forks_url":"https://api.github.com/repos/AndrewDubovtsev/37104-code-and-magick/forks","keys_url":"https://api.github.com/repos/AndrewDubovtsev/37104-code-and-magick/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AndrewDubovtsev/37104-code-and-magick/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AndrewDubovtsev/37104-code-and-magick/teams","hooks_url":"https://api.github.com/repos/AndrewDubovtsev/37104-code-and-magick/hooks","issue_events_url":"https://api.github.com/repos/AndrewDubovtsev/37104-code-and-magick/issues/events{/number}","events_url":"https://api.github.com/repos/AndrewDubovtsev/37104-code-and-magick/events","assignees_url":"https://api.github.com/repos/AndrewDubovtsev/37104-code-and-magick/assignees{/user}","branches_url":"https://api.github.com/repos/AndrewDubovtsev/37104-code-and-magick/branches{/branch}","tags_url":"https://api.github.com/repos/AndrewDubovtsev/37104-code-and-magick/tags","blobs_url":"https://api.github.com/repos/AndrewDubovtsev/37104-code-and-magick/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AndrewDubovtsev/37104-code-and-magick/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AndrewDubovtsev/37104-code-and-magick/git/refs{/sha}","trees_url":"https://api.github.com/repos/AndrewDubovtsev/37104-code-and-magick/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AndrewDubovtsev/37104-code-and-magick/statuses/{sha}","languages_url":"https://api.github.com/repos/AndrewDubovtsev/37104-code-and-magick/languages","stargazers_url":"https://api.github.com/repos/AndrewDubovtsev/37104-code-and-magick/stargazers","contributors_url":"https://api.github.com/repos/AndrewDubovtsev/37104-code-and-magick/contributors","subscribers_url":"https://api.github.com/repos/AndrewDubovtsev/37104-code-and-magick/subscribers","subscription_url":"https://api.github.com/repos/AndrewDubovtsev/37104-code-and-magick/subscription","commits_url":"https://api.github.com/repos/AndrewDubovtsev/37104-code-and-magick/commits{/sha}","git_commits_url":"https://api.github.com/repos/AndrewDubovtsev/37104-code-and-magick/git/commits{/sha}","comments_url":"https://api.github.com/repos/AndrewDubovtsev/37104-code-and-magick/comments{/number}","issue_comment_url":"https://api.github.com/repos/AndrewDubovtsev/37104-code-and-magick/issues/comments{/number}","contents_url":"https://api.github.com/repos/AndrewDubovtsev/37104-code-and-magick/contents/{+path}","compare_url":"https://api.github.com/repos/AndrewDubovtsev/37104-code-and-magick/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AndrewDubovtsev/37104-code-and-magick/merges","archive_url":"https://api.github.com/repos/AndrewDubovtsev/37104-code-and-magick/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AndrewDubovtsev/37104-code-and-magick/downloads","issues_url":"https://api.github.com/repos/AndrewDubovtsev/37104-code-and-magick/issues{/number}","pulls_url":"https://api.github.com/repos/AndrewDubovtsev/37104-code-and-magick/pulls{/number}","milestones_url":"https://api.github.com/repos/AndrewDubovtsev/37104-code-and-magick/milestones{/number}","notifications_url":"https://api.github.com/repos/AndrewDubovtsev/37104-code-and-magick/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AndrewDubovtsev/37104-code-and-magick/labels{/name}","releases_url":"https://api.github.com/repos/AndrewDubovtsev/37104-code-and-magick/releases{/id}","created_at":"2015-11-17T18:39:52Z","updated_at":"2015-11-17T18:39:52Z","pushed_at":"2015-12-22T14:19:15Z","git_url":"git://github.com/AndrewDubovtsev/37104-code-and-magick.git","ssh_url":"git@github.com:AndrewDubovtsev/37104-code-and-magick.git","clone_url":"https://github.com/AndrewDubovtsev/37104-code-and-magick.git","svn_url":"https://github.com/AndrewDubovtsev/37104-code-and-magick","homepage":"https://github.com/AndrewDubovtsev/37104-code-and-magick","size":1220,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":false,"has_wiki":false,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"js-htmlacademy:master","ref":"master","sha":"99cf0aaf6a59ecd3d80f6127654a4bec22959571","user":{"login":"js-htmlacademy","id":14179712,"avatar_url":"https://avatars.githubusercontent.com/u/14179712?v=3","gravatar_id":"","url":"https://api.github.com/users/js-htmlacademy","html_url":"https://github.com/js-htmlacademy","followers_url":"https://api.github.com/users/js-htmlacademy/followers","following_url":"https://api.github.com/users/js-htmlacademy/following{/other_user}","gists_url":"https://api.github.com/users/js-htmlacademy/gists{/gist_id}","starred_url":"https://api.github.com/users/js-htmlacademy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/js-htmlacademy/subscriptions","organizations_url":"https://api.github.com/users/js-htmlacademy/orgs","repos_url":"https://api.github.com/users/js-htmlacademy/repos","events_url":"https://api.github.com/users/js-htmlacademy/events{/privacy}","received_events_url":"https://api.github.com/users/js-htmlacademy/received_events","type":"Organization","site_admin":false},"repo":{"id":45933061,"name":"37104-code-and-magick","full_name":"js-htmlacademy/37104-code-and-magick","owner":{"login":"js-htmlacademy","id":14179712,"avatar_url":"https://avatars.githubusercontent.com/u/14179712?v=3","gravatar_id":"","url":"https://api.github.com/users/js-htmlacademy","html_url":"https://github.com/js-htmlacademy","followers_url":"https://api.github.com/users/js-htmlacademy/followers","following_url":"https://api.github.com/users/js-htmlacademy/following{/other_user}","gists_url":"https://api.github.com/users/js-htmlacademy/gists{/gist_id}","starred_url":"https://api.github.com/users/js-htmlacademy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/js-htmlacademy/subscriptions","organizations_url":"https://api.github.com/users/js-htmlacademy/orgs","repos_url":"https://api.github.com/users/js-htmlacademy/repos","events_url":"https://api.github.com/users/js-htmlacademy/events{/privacy}","received_events_url":"https://api.github.com/users/js-htmlacademy/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/js-htmlacademy/37104-code-and-magick","description":"Андрей Дубовцев","fork":false,"url":"https://api.github.com/repos/js-htmlacademy/37104-code-and-magick","forks_url":"https://api.github.com/repos/js-htmlacademy/37104-code-and-magick/forks","keys_url":"https://api.github.com/repos/js-htmlacademy/37104-code-and-magick/keys{/key_id}","collaborators_url":"https://api.github.com/repos/js-htmlacademy/37104-code-and-magick/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/js-htmlacademy/37104-code-and-magick/teams","hooks_url":"https://api.github.com/repos/js-htmlacademy/37104-code-and-magick/hooks","issue_events_url":"https://api.github.com/repos/js-htmlacademy/37104-code-and-magick/issues/events{/number}","events_url":"https://api.github.com/repos/js-htmlacademy/37104-code-and-magick/events","assignees_url":"https://api.github.com/repos/js-htmlacademy/37104-code-and-magick/assignees{/user}","branches_url":"https://api.github.com/repos/js-htmlacademy/37104-code-and-magick/branches{/branch}","tags_url":"https://api.github.com/repos/js-htmlacademy/37104-code-and-magick/tags","blobs_url":"https://api.github.com/repos/js-htmlacademy/37104-code-and-magick/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/js-htmlacademy/37104-code-and-magick/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/js-htmlacademy/37104-code-and-magick/git/refs{/sha}","trees_url":"https://api.github.com/repos/js-htmlacademy/37104-code-and-magick/git/trees{/sha}","statuses_url":"https://api.github.com/repos/js-htmlacademy/37104-code-and-magick/statuses/{sha}","languages_url":"https://api.github.com/repos/js-htmlacademy/37104-code-and-magick/languages","stargazers_url":"https://api.github.com/repos/js-htmlacademy/37104-code-and-magick/stargazers","contributors_url":"https://api.github.com/repos/js-htmlacademy/37104-code-and-magick/contributors","subscribers_url":"https://api.github.com/repos/js-htmlacademy/37104-code-and-magick/subscribers","subscription_url":"https://api.github.com/repos/js-htmlacademy/37104-code-and-magick/subscription","commits_url":"https://api.github.com/repos/js-htmlacademy/37104-code-and-magick/commits{/sha}","git_commits_url":"https://api.github.com/repos/js-htmlacademy/37104-code-and-magick/git/commits{/sha}","comments_url":"https://api.github.com/repos/js-htmlacademy/37104-code-and-magick/comments{/number}","issue_comment_url":"https://api.github.com/repos/js-htmlacademy/37104-code-and-magick/issues/comments{/number}","contents_url":"https://api.github.com/repos/js-htmlacademy/37104-code-and-magick/contents/{+path}","compare_url":"https://api.github.com/repos/js-htmlacademy/37104-code-and-magick/compare/{base}...{head}","merges_url":"https://api.github.com/repos/js-htmlacademy/37104-code-and-magick/merges","archive_url":"https://api.github.com/repos/js-htmlacademy/37104-code-and-magick/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/js-htmlacademy/37104-code-and-magick/downloads","issues_url":"https://api.github.com/repos/js-htmlacademy/37104-code-and-magick/issues{/number}","pulls_url":"https://api.github.com/repos/js-htmlacademy/37104-code-and-magick/pulls{/number}","milestones_url":"https://api.github.com/repos/js-htmlacademy/37104-code-and-magick/milestones{/number}","notifications_url":"https://api.github.com/repos/js-htmlacademy/37104-code-and-magick/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/js-htmlacademy/37104-code-and-magick/labels{/name}","releases_url":"https://api.github.com/repos/js-htmlacademy/37104-code-and-magick/releases{/id}","created_at":"2015-11-10T18:49:50Z","updated_at":"2015-11-14T18:11:23Z","pushed_at":"2015-12-20T21:41:46Z","git_url":"git://github.com/js-htmlacademy/37104-code-and-magick.git","ssh_url":"git@github.com:js-htmlacademy/37104-code-and-magick.git","clone_url":"https://github.com/js-htmlacademy/37104-code-and-magick.git","svn_url":"https://github.com/js-htmlacademy/37104-code-and-magick","homepage":"https://github.com/AndrewDubovtsev/37104-code-and-magick","size":1222,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"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/js-htmlacademy/37104-code-and-magick/pulls/21"},"html":{"href":"https://github.com/js-htmlacademy/37104-code-and-magick/pull/21"},"issue":{"href":"https://api.github.com/repos/js-htmlacademy/37104-code-and-magick/issues/21"},"comments":{"href":"https://api.github.com/repos/js-htmlacademy/37104-code-and-magick/issues/21/comments"},"review_comments":{"href":"https://api.github.com/repos/js-htmlacademy/37104-code-and-magick/pulls/21/comments"},"review_comment":{"href":"https://api.github.com/repos/js-htmlacademy/37104-code-and-magick/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/js-htmlacademy/37104-code-and-magick/pulls/21/commits"},"statuses":{"href":"https://api.github.com/repos/js-htmlacademy/37104-code-and-magick/statuses/f0d10ff8214253ae1fe01c0815df3fb02b72c36c"}}}}