{"action":"created","comment":{"url":"https://api.github.com/repos/pinterest/react-pinterest/pulls/comments/48173453","id":48173453,"diff_hunk":"@@ -80,15 +83,21 @@ export default class PinItButton extends PinterestBase {\n      * @returns {JSX}\n      */\n     renderPinOne() {\n-        const {pin, media, url, description} = this.props;\n+        const {pin, media} = this.props;\n+        let {url, description} = this.props;\n         let href;\n         if (pin) {\n             href = Const.URL.REPIN.replace('<id>', pin) + `?guid=${Config.guid}`;\n         } else {\n+            if(isBrowser) {\n+              url = url || window.document.URL;\n+              description = description || window.document.title;\n+            }\n+\n             href = Const.URL.PIN_CREATE + `?guid=${Config.guid}`;\n             href += `&media=${encodeURIComponent(media)}`;\n-            href += `&url=${encodeURIComponent(url || document.URL)}`;\n-            href += `&description=${encodeURIComponent(description || document.title)}`;\n+            href += `&url=${encodeURIComponent(url)}`;\n+            href += `&description=${encodeURIComponent(description)}`;","path":"src/components/PinItButton.js","position":35,"original_position":35,"commit_id":"45d97360a4e09429aba6aadc649ccf755ff03bd2","original_commit_id":"45d97360a4e09429aba6aadc649ccf755ff03bd2","user":{"login":"zackargyle","id":3934294,"avatar_url":"https://avatars.githubusercontent.com/u/3934294?v=3","gravatar_id":"","url":"https://api.github.com/users/zackargyle","html_url":"https://github.com/zackargyle","followers_url":"https://api.github.com/users/zackargyle/followers","following_url":"https://api.github.com/users/zackargyle/following{/other_user}","gists_url":"https://api.github.com/users/zackargyle/gists{/gist_id}","starred_url":"https://api.github.com/users/zackargyle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zackargyle/subscriptions","organizations_url":"https://api.github.com/users/zackargyle/orgs","repos_url":"https://api.github.com/users/zackargyle/repos","events_url":"https://api.github.com/users/zackargyle/events{/privacy}","received_events_url":"https://api.github.com/users/zackargyle/received_events","type":"User","site_admin":false},"body":"Oh shoot, I did not even pay attention, this is not a click-handler anyway. Yup. Good call.","created_at":"2015-12-21T18:18:54Z","updated_at":"2015-12-21T18:18:54Z","html_url":"https://github.com/pinterest/react-pinterest/pull/14#discussion_r48173453","pull_request_url":"https://api.github.com/repos/pinterest/react-pinterest/pulls/14","_links":{"self":{"href":"https://api.github.com/repos/pinterest/react-pinterest/pulls/comments/48173453"},"html":{"href":"https://github.com/pinterest/react-pinterest/pull/14#discussion_r48173453"},"pull_request":{"href":"https://api.github.com/repos/pinterest/react-pinterest/pulls/14"}}},"pull_request":{"url":"https://api.github.com/repos/pinterest/react-pinterest/pulls/14","id":54284490,"html_url":"https://github.com/pinterest/react-pinterest/pull/14","diff_url":"https://github.com/pinterest/react-pinterest/pull/14.diff","patch_url":"https://github.com/pinterest/react-pinterest/pull/14.patch","issue_url":"https://api.github.com/repos/pinterest/react-pinterest/issues/14","number":14,"state":"open","locked":false,"title":"Guard window/document references with is-browser checks","user":{"login":"adamburmister","id":7788,"avatar_url":"https://avatars.githubusercontent.com/u/7788?v=3","gravatar_id":"","url":"https://api.github.com/users/adamburmister","html_url":"https://github.com/adamburmister","followers_url":"https://api.github.com/users/adamburmister/followers","following_url":"https://api.github.com/users/adamburmister/following{/other_user}","gists_url":"https://api.github.com/users/adamburmister/gists{/gist_id}","starred_url":"https://api.github.com/users/adamburmister/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adamburmister/subscriptions","organizations_url":"https://api.github.com/users/adamburmister/orgs","repos_url":"https://api.github.com/users/adamburmister/repos","events_url":"https://api.github.com/users/adamburmister/events{/privacy}","received_events_url":"https://api.github.com/users/adamburmister/received_events","type":"User","site_admin":false},"body":"To: @zackargyle \r\n\r\nAdded:\r\n- Add `isBrowser` const to files referencing window/document\r\n- Guard methods where server side rendering doesn't make sense\r\n\r\nTested:\r\n- Current client side rendering continues to work\r\n\r\nComing in future PRs:\r\n- Testing framework or example which will demonstrate isomorphic rendering","created_at":"2015-12-21T17:57:01Z","updated_at":"2015-12-21T18:18:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5920cc5207a9a9a70bee5a604c30bb691fbca54e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/pinterest/react-pinterest/pulls/14/commits","review_comments_url":"https://api.github.com/repos/pinterest/react-pinterest/pulls/14/comments","review_comment_url":"https://api.github.com/repos/pinterest/react-pinterest/pulls/comments{/number}","comments_url":"https://api.github.com/repos/pinterest/react-pinterest/issues/14/comments","statuses_url":"https://api.github.com/repos/pinterest/react-pinterest/statuses/45d97360a4e09429aba6aadc649ccf755ff03bd2","head":{"label":"adamburmister:feature/universal","ref":"feature/universal","sha":"45d97360a4e09429aba6aadc649ccf755ff03bd2","user":{"login":"adamburmister","id":7788,"avatar_url":"https://avatars.githubusercontent.com/u/7788?v=3","gravatar_id":"","url":"https://api.github.com/users/adamburmister","html_url":"https://github.com/adamburmister","followers_url":"https://api.github.com/users/adamburmister/followers","following_url":"https://api.github.com/users/adamburmister/following{/other_user}","gists_url":"https://api.github.com/users/adamburmister/gists{/gist_id}","starred_url":"https://api.github.com/users/adamburmister/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adamburmister/subscriptions","organizations_url":"https://api.github.com/users/adamburmister/orgs","repos_url":"https://api.github.com/users/adamburmister/repos","events_url":"https://api.github.com/users/adamburmister/events{/privacy}","received_events_url":"https://api.github.com/users/adamburmister/received_events","type":"User","site_admin":false},"repo":{"id":48383143,"name":"react-pinterest","full_name":"adamburmister/react-pinterest","owner":{"login":"adamburmister","id":7788,"avatar_url":"https://avatars.githubusercontent.com/u/7788?v=3","gravatar_id":"","url":"https://api.github.com/users/adamburmister","html_url":"https://github.com/adamburmister","followers_url":"https://api.github.com/users/adamburmister/followers","following_url":"https://api.github.com/users/adamburmister/following{/other_user}","gists_url":"https://api.github.com/users/adamburmister/gists{/gist_id}","starred_url":"https://api.github.com/users/adamburmister/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adamburmister/subscriptions","organizations_url":"https://api.github.com/users/adamburmister/orgs","repos_url":"https://api.github.com/users/adamburmister/repos","events_url":"https://api.github.com/users/adamburmister/events{/privacy}","received_events_url":"https://api.github.com/users/adamburmister/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/adamburmister/react-pinterest","description":"","fork":true,"url":"https://api.github.com/repos/adamburmister/react-pinterest","forks_url":"https://api.github.com/repos/adamburmister/react-pinterest/forks","keys_url":"https://api.github.com/repos/adamburmister/react-pinterest/keys{/key_id}","collaborators_url":"https://api.github.com/repos/adamburmister/react-pinterest/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/adamburmister/react-pinterest/teams","hooks_url":"https://api.github.com/repos/adamburmister/react-pinterest/hooks","issue_events_url":"https://api.github.com/repos/adamburmister/react-pinterest/issues/events{/number}","events_url":"https://api.github.com/repos/adamburmister/react-pinterest/events","assignees_url":"https://api.github.com/repos/adamburmister/react-pinterest/assignees{/user}","branches_url":"https://api.github.com/repos/adamburmister/react-pinterest/branches{/branch}","tags_url":"https://api.github.com/repos/adamburmister/react-pinterest/tags","blobs_url":"https://api.github.com/repos/adamburmister/react-pinterest/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/adamburmister/react-pinterest/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/adamburmister/react-pinterest/git/refs{/sha}","trees_url":"https://api.github.com/repos/adamburmister/react-pinterest/git/trees{/sha}","statuses_url":"https://api.github.com/repos/adamburmister/react-pinterest/statuses/{sha}","languages_url":"https://api.github.com/repos/adamburmister/react-pinterest/languages","stargazers_url":"https://api.github.com/repos/adamburmister/react-pinterest/stargazers","contributors_url":"https://api.github.com/repos/adamburmister/react-pinterest/contributors","subscribers_url":"https://api.github.com/repos/adamburmister/react-pinterest/subscribers","subscription_url":"https://api.github.com/repos/adamburmister/react-pinterest/subscription","commits_url":"https://api.github.com/repos/adamburmister/react-pinterest/commits{/sha}","git_commits_url":"https://api.github.com/repos/adamburmister/react-pinterest/git/commits{/sha}","comments_url":"https://api.github.com/repos/adamburmister/react-pinterest/comments{/number}","issue_comment_url":"https://api.github.com/repos/adamburmister/react-pinterest/issues/comments{/number}","contents_url":"https://api.github.com/repos/adamburmister/react-pinterest/contents/{+path}","compare_url":"https://api.github.com/repos/adamburmister/react-pinterest/compare/{base}...{head}","merges_url":"https://api.github.com/repos/adamburmister/react-pinterest/merges","archive_url":"https://api.github.com/repos/adamburmister/react-pinterest/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/adamburmister/react-pinterest/downloads","issues_url":"https://api.github.com/repos/adamburmister/react-pinterest/issues{/number}","pulls_url":"https://api.github.com/repos/adamburmister/react-pinterest/pulls{/number}","milestones_url":"https://api.github.com/repos/adamburmister/react-pinterest/milestones{/number}","notifications_url":"https://api.github.com/repos/adamburmister/react-pinterest/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/adamburmister/react-pinterest/labels{/name}","releases_url":"https://api.github.com/repos/adamburmister/react-pinterest/releases{/id}","created_at":"2015-12-21T16:47:34Z","updated_at":"2015-12-21T16:47:34Z","pushed_at":"2015-12-21T17:53:23Z","git_url":"git://github.com/adamburmister/react-pinterest.git","ssh_url":"git@github.com:adamburmister/react-pinterest.git","clone_url":"https://github.com/adamburmister/react-pinterest.git","svn_url":"https://github.com/adamburmister/react-pinterest","homepage":null,"size":2895,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"pinterest:master","ref":"master","sha":"db24b9832adbd1de096901ef759296dbb4af2211","user":{"login":"pinterest","id":541152,"avatar_url":"https://avatars.githubusercontent.com/u/541152?v=3","gravatar_id":"","url":"https://api.github.com/users/pinterest","html_url":"https://github.com/pinterest","followers_url":"https://api.github.com/users/pinterest/followers","following_url":"https://api.github.com/users/pinterest/following{/other_user}","gists_url":"https://api.github.com/users/pinterest/gists{/gist_id}","starred_url":"https://api.github.com/users/pinterest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pinterest/subscriptions","organizations_url":"https://api.github.com/users/pinterest/orgs","repos_url":"https://api.github.com/users/pinterest/repos","events_url":"https://api.github.com/users/pinterest/events{/privacy}","received_events_url":"https://api.github.com/users/pinterest/received_events","type":"Organization","site_admin":false},"repo":{"id":46743311,"name":"react-pinterest","full_name":"pinterest/react-pinterest","owner":{"login":"pinterest","id":541152,"avatar_url":"https://avatars.githubusercontent.com/u/541152?v=3","gravatar_id":"","url":"https://api.github.com/users/pinterest","html_url":"https://github.com/pinterest","followers_url":"https://api.github.com/users/pinterest/followers","following_url":"https://api.github.com/users/pinterest/following{/other_user}","gists_url":"https://api.github.com/users/pinterest/gists{/gist_id}","starred_url":"https://api.github.com/users/pinterest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pinterest/subscriptions","organizations_url":"https://api.github.com/users/pinterest/orgs","repos_url":"https://api.github.com/users/pinterest/repos","events_url":"https://api.github.com/users/pinterest/events{/privacy}","received_events_url":"https://api.github.com/users/pinterest/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/pinterest/react-pinterest","description":"","fork":false,"url":"https://api.github.com/repos/pinterest/react-pinterest","forks_url":"https://api.github.com/repos/pinterest/react-pinterest/forks","keys_url":"https://api.github.com/repos/pinterest/react-pinterest/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pinterest/react-pinterest/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pinterest/react-pinterest/teams","hooks_url":"https://api.github.com/repos/pinterest/react-pinterest/hooks","issue_events_url":"https://api.github.com/repos/pinterest/react-pinterest/issues/events{/number}","events_url":"https://api.github.com/repos/pinterest/react-pinterest/events","assignees_url":"https://api.github.com/repos/pinterest/react-pinterest/assignees{/user}","branches_url":"https://api.github.com/repos/pinterest/react-pinterest/branches{/branch}","tags_url":"https://api.github.com/repos/pinterest/react-pinterest/tags","blobs_url":"https://api.github.com/repos/pinterest/react-pinterest/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pinterest/react-pinterest/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pinterest/react-pinterest/git/refs{/sha}","trees_url":"https://api.github.com/repos/pinterest/react-pinterest/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pinterest/react-pinterest/statuses/{sha}","languages_url":"https://api.github.com/repos/pinterest/react-pinterest/languages","stargazers_url":"https://api.github.com/repos/pinterest/react-pinterest/stargazers","contributors_url":"https://api.github.com/repos/pinterest/react-pinterest/contributors","subscribers_url":"https://api.github.com/repos/pinterest/react-pinterest/subscribers","subscription_url":"https://api.github.com/repos/pinterest/react-pinterest/subscription","commits_url":"https://api.github.com/repos/pinterest/react-pinterest/commits{/sha}","git_commits_url":"https://api.github.com/repos/pinterest/react-pinterest/git/commits{/sha}","comments_url":"https://api.github.com/repos/pinterest/react-pinterest/comments{/number}","issue_comment_url":"https://api.github.com/repos/pinterest/react-pinterest/issues/comments{/number}","contents_url":"https://api.github.com/repos/pinterest/react-pinterest/contents/{+path}","compare_url":"https://api.github.com/repos/pinterest/react-pinterest/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pinterest/react-pinterest/merges","archive_url":"https://api.github.com/repos/pinterest/react-pinterest/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pinterest/react-pinterest/downloads","issues_url":"https://api.github.com/repos/pinterest/react-pinterest/issues{/number}","pulls_url":"https://api.github.com/repos/pinterest/react-pinterest/pulls{/number}","milestones_url":"https://api.github.com/repos/pinterest/react-pinterest/milestones{/number}","notifications_url":"https://api.github.com/repos/pinterest/react-pinterest/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pinterest/react-pinterest/labels{/name}","releases_url":"https://api.github.com/repos/pinterest/react-pinterest/releases{/id}","created_at":"2015-11-23T19:35:56Z","updated_at":"2015-12-12T01:44:05Z","pushed_at":"2015-12-21T17:57:04Z","git_url":"git://github.com/pinterest/react-pinterest.git","ssh_url":"git@github.com:pinterest/react-pinterest.git","clone_url":"https://github.com/pinterest/react-pinterest.git","svn_url":"https://github.com/pinterest/react-pinterest","homepage":null,"size":2895,"stargazers_count":54,"watchers_count":54,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":5,"forks":6,"open_issues":5,"watchers":54,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/pinterest/react-pinterest/pulls/14"},"html":{"href":"https://github.com/pinterest/react-pinterest/pull/14"},"issue":{"href":"https://api.github.com/repos/pinterest/react-pinterest/issues/14"},"comments":{"href":"https://api.github.com/repos/pinterest/react-pinterest/issues/14/comments"},"review_comments":{"href":"https://api.github.com/repos/pinterest/react-pinterest/pulls/14/comments"},"review_comment":{"href":"https://api.github.com/repos/pinterest/react-pinterest/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/pinterest/react-pinterest/pulls/14/commits"},"statuses":{"href":"https://api.github.com/repos/pinterest/react-pinterest/statuses/45d97360a4e09429aba6aadc649ccf755ff03bd2"}}}}