{"action":"created","comment":{"url":"https://api.github.com/repos/ello/webapp/pulls/comments/82282013","pull_request_review_id":3201371,"id":82282013,"diff_hunk":"@@ -51,24 +56,28 @@ function checkForImages(e) {\n       // creates markdown of the image when right clicking on image to copy in FF\n       handlePlainText(`![Pasted Image](${image.src})`)\n     }\n-    e.target.parentNode.removeChild(image)\n+    image.parentNode.removeChild(image)\n   }\n }\n \n export function pasted(e, d, id) {\n   dispatch = d\n   editorId = id\n+  const items = e.clipboardData.items || {}\n   const text = e.clipboardData.getData('text/plain')\n-  const items = e.clipboardData.items\n-  if (text.length) {\n+  const isImage = some(items, item => /image/.test(item.type))\n+  if (items && isImage) {","path":"src/components/editor/PasteHandler.js","position":39,"original_position":39,"commit_id":"8f5b73974b500d1a2ed7dd5d247a4737dfde1efe","original_commit_id":"8f5b73974b500d1a2ed7dd5d247a4737dfde1efe","user":{"login":"rynbyjn","id":96433,"avatar_url":"https://avatars.githubusercontent.com/u/96433?v=3","gravatar_id":"","url":"https://api.github.com/users/rynbyjn","html_url":"https://github.com/rynbyjn","followers_url":"https://api.github.com/users/rynbyjn/followers","following_url":"https://api.github.com/users/rynbyjn/following{/other_user}","gists_url":"https://api.github.com/users/rynbyjn/gists{/gist_id}","starred_url":"https://api.github.com/users/rynbyjn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rynbyjn/subscriptions","organizations_url":"https://api.github.com/users/rynbyjn/orgs","repos_url":"https://api.github.com/users/rynbyjn/repos","events_url":"https://api.github.com/users/rynbyjn/events{/privacy}","received_events_url":"https://api.github.com/users/rynbyjn/received_events","type":"User","site_admin":false},"body":"The native `some` is for arrays and `items` is an object.","created_at":"2016-10-06T20:50:44Z","updated_at":"2016-10-06T20:50:44Z","html_url":"https://github.com/ello/webapp/pull/33#discussion_r82282013","pull_request_url":"https://api.github.com/repos/ello/webapp/pulls/33","_links":{"self":{"href":"https://api.github.com/repos/ello/webapp/pulls/comments/82282013"},"html":{"href":"https://github.com/ello/webapp/pull/33#discussion_r82282013"},"pull_request":{"href":"https://api.github.com/repos/ello/webapp/pulls/33"}}},"pull_request":{"url":"https://api.github.com/repos/ello/webapp/pulls/33","id":88304125,"html_url":"https://github.com/ello/webapp/pull/33","diff_url":"https://github.com/ello/webapp/pull/33.diff","patch_url":"https://github.com/ello/webapp/pull/33.patch","issue_url":"https://api.github.com/repos/ello/webapp/issues/33","number":33,"state":"open","locked":false,"title":"Update the paste event to work properly","user":{"login":"rynbyjn","id":96433,"avatar_url":"https://avatars.githubusercontent.com/u/96433?v=3","gravatar_id":"","url":"https://api.github.com/users/rynbyjn","html_url":"https://github.com/rynbyjn","followers_url":"https://api.github.com/users/rynbyjn/followers","following_url":"https://api.github.com/users/rynbyjn/following{/other_user}","gists_url":"https://api.github.com/users/rynbyjn/gists{/gist_id}","starred_url":"https://api.github.com/users/rynbyjn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rynbyjn/subscriptions","organizations_url":"https://api.github.com/users/rynbyjn/orgs","repos_url":"https://api.github.com/users/rynbyjn/repos","events_url":"https://api.github.com/users/rynbyjn/events{/privacy}","received_events_url":"https://api.github.com/users/rynbyjn/received_events","type":"User","site_admin":false},"body":"[Fixes #131118235](https://www.pivotaltracker.com/story/show/131118235)","created_at":"2016-10-06T17:17:05Z","updated_at":"2016-10-06T20:50:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"22679d32c7ffa0033e785442daad9a2616385e17","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/ello/webapp/pulls/33/commits","review_comments_url":"https://api.github.com/repos/ello/webapp/pulls/33/comments","review_comment_url":"https://api.github.com/repos/ello/webapp/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ello/webapp/issues/33/comments","statuses_url":"https://api.github.com/repos/ello/webapp/statuses/8f5b73974b500d1a2ed7dd5d247a4737dfde1efe","head":{"label":"ello:rb/fix/pasting-clipboard-context","ref":"rb/fix/pasting-clipboard-context","sha":"8f5b73974b500d1a2ed7dd5d247a4737dfde1efe","user":{"login":"ello","id":9370718,"avatar_url":"https://avatars.githubusercontent.com/u/9370718?v=3","gravatar_id":"","url":"https://api.github.com/users/ello","html_url":"https://github.com/ello","followers_url":"https://api.github.com/users/ello/followers","following_url":"https://api.github.com/users/ello/following{/other_user}","gists_url":"https://api.github.com/users/ello/gists{/gist_id}","starred_url":"https://api.github.com/users/ello/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ello/subscriptions","organizations_url":"https://api.github.com/users/ello/orgs","repos_url":"https://api.github.com/users/ello/repos","events_url":"https://api.github.com/users/ello/events{/privacy}","received_events_url":"https://api.github.com/users/ello/received_events","type":"Organization","site_admin":false},"repo":{"id":68226310,"name":"webapp","full_name":"ello/webapp","owner":{"login":"ello","id":9370718,"avatar_url":"https://avatars.githubusercontent.com/u/9370718?v=3","gravatar_id":"","url":"https://api.github.com/users/ello","html_url":"https://github.com/ello","followers_url":"https://api.github.com/users/ello/followers","following_url":"https://api.github.com/users/ello/following{/other_user}","gists_url":"https://api.github.com/users/ello/gists{/gist_id}","starred_url":"https://api.github.com/users/ello/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ello/subscriptions","organizations_url":"https://api.github.com/users/ello/orgs","repos_url":"https://api.github.com/users/ello/repos","events_url":"https://api.github.com/users/ello/events{/privacy}","received_events_url":"https://api.github.com/users/ello/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ello/webapp","description":"The web front end for ello.co","fork":false,"url":"https://api.github.com/repos/ello/webapp","forks_url":"https://api.github.com/repos/ello/webapp/forks","keys_url":"https://api.github.com/repos/ello/webapp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ello/webapp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ello/webapp/teams","hooks_url":"https://api.github.com/repos/ello/webapp/hooks","issue_events_url":"https://api.github.com/repos/ello/webapp/issues/events{/number}","events_url":"https://api.github.com/repos/ello/webapp/events","assignees_url":"https://api.github.com/repos/ello/webapp/assignees{/user}","branches_url":"https://api.github.com/repos/ello/webapp/branches{/branch}","tags_url":"https://api.github.com/repos/ello/webapp/tags","blobs_url":"https://api.github.com/repos/ello/webapp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ello/webapp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ello/webapp/git/refs{/sha}","trees_url":"https://api.github.com/repos/ello/webapp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ello/webapp/statuses/{sha}","languages_url":"https://api.github.com/repos/ello/webapp/languages","stargazers_url":"https://api.github.com/repos/ello/webapp/stargazers","contributors_url":"https://api.github.com/repos/ello/webapp/contributors","subscribers_url":"https://api.github.com/repos/ello/webapp/subscribers","subscription_url":"https://api.github.com/repos/ello/webapp/subscription","commits_url":"https://api.github.com/repos/ello/webapp/commits{/sha}","git_commits_url":"https://api.github.com/repos/ello/webapp/git/commits{/sha}","comments_url":"https://api.github.com/repos/ello/webapp/comments{/number}","issue_comment_url":"https://api.github.com/repos/ello/webapp/issues/comments{/number}","contents_url":"https://api.github.com/repos/ello/webapp/contents/{+path}","compare_url":"https://api.github.com/repos/ello/webapp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ello/webapp/merges","archive_url":"https://api.github.com/repos/ello/webapp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ello/webapp/downloads","issues_url":"https://api.github.com/repos/ello/webapp/issues{/number}","pulls_url":"https://api.github.com/repos/ello/webapp/pulls{/number}","milestones_url":"https://api.github.com/repos/ello/webapp/milestones{/number}","notifications_url":"https://api.github.com/repos/ello/webapp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ello/webapp/labels{/name}","releases_url":"https://api.github.com/repos/ello/webapp/releases{/id}","deployments_url":"https://api.github.com/repos/ello/webapp/deployments","created_at":"2016-09-14T17:07:03Z","updated_at":"2016-10-05T20:31:38Z","pushed_at":"2016-10-06T20:34:32Z","git_url":"git://github.com/ello/webapp.git","ssh_url":"git@github.com:ello/webapp.git","clone_url":"https://github.com/ello/webapp.git","svn_url":"https://github.com/ello/webapp","homepage":"ello.co","size":5446,"stargazers_count":15,"watchers_count":15,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":3,"forks":0,"open_issues":3,"watchers":15,"default_branch":"master"}},"base":{"label":"ello:master","ref":"master","sha":"1a49b554ca9a6ff67a264da12628ba9be845c31a","user":{"login":"ello","id":9370718,"avatar_url":"https://avatars.githubusercontent.com/u/9370718?v=3","gravatar_id":"","url":"https://api.github.com/users/ello","html_url":"https://github.com/ello","followers_url":"https://api.github.com/users/ello/followers","following_url":"https://api.github.com/users/ello/following{/other_user}","gists_url":"https://api.github.com/users/ello/gists{/gist_id}","starred_url":"https://api.github.com/users/ello/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ello/subscriptions","organizations_url":"https://api.github.com/users/ello/orgs","repos_url":"https://api.github.com/users/ello/repos","events_url":"https://api.github.com/users/ello/events{/privacy}","received_events_url":"https://api.github.com/users/ello/received_events","type":"Organization","site_admin":false},"repo":{"id":68226310,"name":"webapp","full_name":"ello/webapp","owner":{"login":"ello","id":9370718,"avatar_url":"https://avatars.githubusercontent.com/u/9370718?v=3","gravatar_id":"","url":"https://api.github.com/users/ello","html_url":"https://github.com/ello","followers_url":"https://api.github.com/users/ello/followers","following_url":"https://api.github.com/users/ello/following{/other_user}","gists_url":"https://api.github.com/users/ello/gists{/gist_id}","starred_url":"https://api.github.com/users/ello/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ello/subscriptions","organizations_url":"https://api.github.com/users/ello/orgs","repos_url":"https://api.github.com/users/ello/repos","events_url":"https://api.github.com/users/ello/events{/privacy}","received_events_url":"https://api.github.com/users/ello/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ello/webapp","description":"The web front end for ello.co","fork":false,"url":"https://api.github.com/repos/ello/webapp","forks_url":"https://api.github.com/repos/ello/webapp/forks","keys_url":"https://api.github.com/repos/ello/webapp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ello/webapp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ello/webapp/teams","hooks_url":"https://api.github.com/repos/ello/webapp/hooks","issue_events_url":"https://api.github.com/repos/ello/webapp/issues/events{/number}","events_url":"https://api.github.com/repos/ello/webapp/events","assignees_url":"https://api.github.com/repos/ello/webapp/assignees{/user}","branches_url":"https://api.github.com/repos/ello/webapp/branches{/branch}","tags_url":"https://api.github.com/repos/ello/webapp/tags","blobs_url":"https://api.github.com/repos/ello/webapp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ello/webapp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ello/webapp/git/refs{/sha}","trees_url":"https://api.github.com/repos/ello/webapp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ello/webapp/statuses/{sha}","languages_url":"https://api.github.com/repos/ello/webapp/languages","stargazers_url":"https://api.github.com/repos/ello/webapp/stargazers","contributors_url":"https://api.github.com/repos/ello/webapp/contributors","subscribers_url":"https://api.github.com/repos/ello/webapp/subscribers","subscription_url":"https://api.github.com/repos/ello/webapp/subscription","commits_url":"https://api.github.com/repos/ello/webapp/commits{/sha}","git_commits_url":"https://api.github.com/repos/ello/webapp/git/commits{/sha}","comments_url":"https://api.github.com/repos/ello/webapp/comments{/number}","issue_comment_url":"https://api.github.com/repos/ello/webapp/issues/comments{/number}","contents_url":"https://api.github.com/repos/ello/webapp/contents/{+path}","compare_url":"https://api.github.com/repos/ello/webapp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ello/webapp/merges","archive_url":"https://api.github.com/repos/ello/webapp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ello/webapp/downloads","issues_url":"https://api.github.com/repos/ello/webapp/issues{/number}","pulls_url":"https://api.github.com/repos/ello/webapp/pulls{/number}","milestones_url":"https://api.github.com/repos/ello/webapp/milestones{/number}","notifications_url":"https://api.github.com/repos/ello/webapp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ello/webapp/labels{/name}","releases_url":"https://api.github.com/repos/ello/webapp/releases{/id}","deployments_url":"https://api.github.com/repos/ello/webapp/deployments","created_at":"2016-09-14T17:07:03Z","updated_at":"2016-10-05T20:31:38Z","pushed_at":"2016-10-06T20:34:32Z","git_url":"git://github.com/ello/webapp.git","ssh_url":"git@github.com:ello/webapp.git","clone_url":"https://github.com/ello/webapp.git","svn_url":"https://github.com/ello/webapp","homepage":"ello.co","size":5446,"stargazers_count":15,"watchers_count":15,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":3,"forks":0,"open_issues":3,"watchers":15,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ello/webapp/pulls/33"},"html":{"href":"https://github.com/ello/webapp/pull/33"},"issue":{"href":"https://api.github.com/repos/ello/webapp/issues/33"},"comments":{"href":"https://api.github.com/repos/ello/webapp/issues/33/comments"},"review_comments":{"href":"https://api.github.com/repos/ello/webapp/pulls/33/comments"},"review_comment":{"href":"https://api.github.com/repos/ello/webapp/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ello/webapp/pulls/33/commits"},"statuses":{"href":"https://api.github.com/repos/ello/webapp/statuses/8f5b73974b500d1a2ed7dd5d247a4737dfde1efe"}}}}
{"actor":{"display_login":"rynbyjn"}}