{"action":"created","comment":{"url":"https://api.github.com/repos/Microsoft/BotFramework-WebChat/pulls/comments/132518919","pull_request_review_id":55609060,"id":132518919,"diff_hunk":"@@ -267,12 +267,16 @@ export const AttachmentView = (props: {\n                     receiptCardBuilder.addTextBlock(item.price, { horizontalAlignment: 'right' }, columns3[1]);\n                 }\n             });\n-            const taxCol = receiptCardBuilder.addColumnSet([75, 25]);\n-            receiptCardBuilder.addTextBlock(props.format.strings.receiptTax, { size: \"medium\", weight: \"bolder\" }, taxCol[0]);\n-            receiptCardBuilder.addTextBlock(attachment.content.tax, { horizontalAlignment: 'right' }, taxCol[1]);\n-            const totalCol = receiptCardBuilder.addColumnSet([75, 25]);\n-            receiptCardBuilder.addTextBlock(props.format.strings.receiptTotal, { size: \"medium\", weight: \"bolder\" }, totalCol[0]);\n-            receiptCardBuilder.addTextBlock(attachment.content.total, { horizontalAlignment: 'right', size: \"medium\", weight: \"bolder\" }, totalCol[1]);\n+            if(attachment.content.tax !== null && typeof attachment.content.tax !== \"undefined\") {","path":"src/Attachment.tsx","position":10,"original_position":10,"commit_id":"24963339aa48f2bfe1a64f6e8252122d3e970ffd","original_commit_id":"24963339aa48f2bfe1a64f6e8252122d3e970ffd","user":{"login":"danmarshall","id":11507384,"avatar_url":"https://avatars2.githubusercontent.com/u/11507384?v=4","gravatar_id":"","url":"https://api.github.com/users/danmarshall","html_url":"https://github.com/danmarshall","followers_url":"https://api.github.com/users/danmarshall/followers","following_url":"https://api.github.com/users/danmarshall/following{/other_user}","gists_url":"https://api.github.com/users/danmarshall/gists{/gist_id}","starred_url":"https://api.github.com/users/danmarshall/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danmarshall/subscriptions","organizations_url":"https://api.github.com/users/danmarshall/orgs","repos_url":"https://api.github.com/users/danmarshall/repos","events_url":"https://api.github.com/users/danmarshall/events{/privacy}","received_events_url":"https://api.github.com/users/danmarshall/received_events","type":"User","site_admin":false},"body":"Can you create a local function for the null & undefined check?","created_at":"2017-08-10T17:34:59Z","updated_at":"2017-08-10T17:34:59Z","html_url":"https://github.com/Microsoft/BotFramework-WebChat/pull/633#discussion_r132518919","pull_request_url":"https://api.github.com/repos/Microsoft/BotFramework-WebChat/pulls/633","_links":{"self":{"href":"https://api.github.com/repos/Microsoft/BotFramework-WebChat/pulls/comments/132518919"},"html":{"href":"https://github.com/Microsoft/BotFramework-WebChat/pull/633#discussion_r132518919"},"pull_request":{"href":"https://api.github.com/repos/Microsoft/BotFramework-WebChat/pulls/633"}}},"pull_request":{"url":"https://api.github.com/repos/Microsoft/BotFramework-WebChat/pulls/633","id":135110974,"html_url":"https://github.com/Microsoft/BotFramework-WebChat/pull/633","diff_url":"https://github.com/Microsoft/BotFramework-WebChat/pull/633.diff","patch_url":"https://github.com/Microsoft/BotFramework-WebChat/pull/633.patch","issue_url":"https://api.github.com/repos/Microsoft/BotFramework-WebChat/issues/633","number":633,"state":"open","locked":false,"title":"hide tax and total if not set","user":{"login":"macrozone","id":1972353,"avatar_url":"https://avatars3.githubusercontent.com/u/1972353?v=4","gravatar_id":"","url":"https://api.github.com/users/macrozone","html_url":"https://github.com/macrozone","followers_url":"https://api.github.com/users/macrozone/followers","following_url":"https://api.github.com/users/macrozone/following{/other_user}","gists_url":"https://api.github.com/users/macrozone/gists{/gist_id}","starred_url":"https://api.github.com/users/macrozone/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/macrozone/subscriptions","organizations_url":"https://api.github.com/users/macrozone/orgs","repos_url":"https://api.github.com/users/macrozone/repos","events_url":"https://api.github.com/users/macrozone/events{/privacy}","received_events_url":"https://api.github.com/users/macrozone/received_events","type":"User","site_admin":false},"body":"this hides tax and total if they are null or undefined. \r\n\r\nThe values are shown when they are 0 though","created_at":"2017-08-10T12:22:28Z","updated_at":"2017-08-10T17:34:59Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c0eea730842ab6fc81823cc751ad9f2904b67915","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/Microsoft/BotFramework-WebChat/pulls/633/commits","review_comments_url":"https://api.github.com/repos/Microsoft/BotFramework-WebChat/pulls/633/comments","review_comment_url":"https://api.github.com/repos/Microsoft/BotFramework-WebChat/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Microsoft/BotFramework-WebChat/issues/633/comments","statuses_url":"https://api.github.com/repos/Microsoft/BotFramework-WebChat/statuses/24963339aa48f2bfe1a64f6e8252122d3e970ffd","head":{"label":"panter:feature/hide-tax-and-total-if-not-set","ref":"feature/hide-tax-and-total-if-not-set","sha":"24963339aa48f2bfe1a64f6e8252122d3e970ffd","user":{"login":"panter","id":157435,"avatar_url":"https://avatars2.githubusercontent.com/u/157435?v=4","gravatar_id":"","url":"https://api.github.com/users/panter","html_url":"https://github.com/panter","followers_url":"https://api.github.com/users/panter/followers","following_url":"https://api.github.com/users/panter/following{/other_user}","gists_url":"https://api.github.com/users/panter/gists{/gist_id}","starred_url":"https://api.github.com/users/panter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/panter/subscriptions","organizations_url":"https://api.github.com/users/panter/orgs","repos_url":"https://api.github.com/users/panter/repos","events_url":"https://api.github.com/users/panter/events{/privacy}","received_events_url":"https://api.github.com/users/panter/received_events","type":"Organization","site_admin":false},"repo":{"id":90849515,"name":"BotFramework-WebChat","full_name":"panter/BotFramework-WebChat","owner":{"login":"panter","id":157435,"avatar_url":"https://avatars2.githubusercontent.com/u/157435?v=4","gravatar_id":"","url":"https://api.github.com/users/panter","html_url":"https://github.com/panter","followers_url":"https://api.github.com/users/panter/followers","following_url":"https://api.github.com/users/panter/following{/other_user}","gists_url":"https://api.github.com/users/panter/gists{/gist_id}","starred_url":"https://api.github.com/users/panter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/panter/subscriptions","organizations_url":"https://api.github.com/users/panter/orgs","repos_url":"https://api.github.com/users/panter/repos","events_url":"https://api.github.com/users/panter/events{/privacy}","received_events_url":"https://api.github.com/users/panter/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/panter/BotFramework-WebChat","description":"Embeddable web chat control for the Microsoft Bot Framework","fork":true,"url":"https://api.github.com/repos/panter/BotFramework-WebChat","forks_url":"https://api.github.com/repos/panter/BotFramework-WebChat/forks","keys_url":"https://api.github.com/repos/panter/BotFramework-WebChat/keys{/key_id}","collaborators_url":"https://api.github.com/repos/panter/BotFramework-WebChat/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/panter/BotFramework-WebChat/teams","hooks_url":"https://api.github.com/repos/panter/BotFramework-WebChat/hooks","issue_events_url":"https://api.github.com/repos/panter/BotFramework-WebChat/issues/events{/number}","events_url":"https://api.github.com/repos/panter/BotFramework-WebChat/events","assignees_url":"https://api.github.com/repos/panter/BotFramework-WebChat/assignees{/user}","branches_url":"https://api.github.com/repos/panter/BotFramework-WebChat/branches{/branch}","tags_url":"https://api.github.com/repos/panter/BotFramework-WebChat/tags","blobs_url":"https://api.github.com/repos/panter/BotFramework-WebChat/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/panter/BotFramework-WebChat/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/panter/BotFramework-WebChat/git/refs{/sha}","trees_url":"https://api.github.com/repos/panter/BotFramework-WebChat/git/trees{/sha}","statuses_url":"https://api.github.com/repos/panter/BotFramework-WebChat/statuses/{sha}","languages_url":"https://api.github.com/repos/panter/BotFramework-WebChat/languages","stargazers_url":"https://api.github.com/repos/panter/BotFramework-WebChat/stargazers","contributors_url":"https://api.github.com/repos/panter/BotFramework-WebChat/contributors","subscribers_url":"https://api.github.com/repos/panter/BotFramework-WebChat/subscribers","subscription_url":"https://api.github.com/repos/panter/BotFramework-WebChat/subscription","commits_url":"https://api.github.com/repos/panter/BotFramework-WebChat/commits{/sha}","git_commits_url":"https://api.github.com/repos/panter/BotFramework-WebChat/git/commits{/sha}","comments_url":"https://api.github.com/repos/panter/BotFramework-WebChat/comments{/number}","issue_comment_url":"https://api.github.com/repos/panter/BotFramework-WebChat/issues/comments{/number}","contents_url":"https://api.github.com/repos/panter/BotFramework-WebChat/contents/{+path}","compare_url":"https://api.github.com/repos/panter/BotFramework-WebChat/compare/{base}...{head}","merges_url":"https://api.github.com/repos/panter/BotFramework-WebChat/merges","archive_url":"https://api.github.com/repos/panter/BotFramework-WebChat/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/panter/BotFramework-WebChat/downloads","issues_url":"https://api.github.com/repos/panter/BotFramework-WebChat/issues{/number}","pulls_url":"https://api.github.com/repos/panter/BotFramework-WebChat/pulls{/number}","milestones_url":"https://api.github.com/repos/panter/BotFramework-WebChat/milestones{/number}","notifications_url":"https://api.github.com/repos/panter/BotFramework-WebChat/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/panter/BotFramework-WebChat/labels{/name}","releases_url":"https://api.github.com/repos/panter/BotFramework-WebChat/releases{/id}","deployments_url":"https://api.github.com/repos/panter/BotFramework-WebChat/deployments","created_at":"2017-05-10T09:59:51Z","updated_at":"2017-05-10T09:59:53Z","pushed_at":"2017-08-10T17:21:37Z","git_url":"git://github.com/panter/BotFramework-WebChat.git","ssh_url":"git@github.com:panter/BotFramework-WebChat.git","clone_url":"https://github.com/panter/BotFramework-WebChat.git","svn_url":"https://github.com/panter/BotFramework-WebChat","homepage":"","size":28340,"stargazers_count":0,"watchers_count":0,"language":"TypeScript","has_issues":false,"has_projects":true,"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":"Microsoft:master","ref":"master","sha":"3fb35790f76e54be15a18eadf2d9a4459ae21696","user":{"login":"Microsoft","id":6154722,"avatar_url":"https://avatars2.githubusercontent.com/u/6154722?v=4","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"repo":{"id":62843932,"name":"BotFramework-WebChat","full_name":"Microsoft/BotFramework-WebChat","owner":{"login":"Microsoft","id":6154722,"avatar_url":"https://avatars2.githubusercontent.com/u/6154722?v=4","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Microsoft/BotFramework-WebChat","description":"Embeddable web chat control for the Microsoft Bot Framework","fork":false,"url":"https://api.github.com/repos/Microsoft/BotFramework-WebChat","forks_url":"https://api.github.com/repos/Microsoft/BotFramework-WebChat/forks","keys_url":"https://api.github.com/repos/Microsoft/BotFramework-WebChat/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Microsoft/BotFramework-WebChat/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Microsoft/BotFramework-WebChat/teams","hooks_url":"https://api.github.com/repos/Microsoft/BotFramework-WebChat/hooks","issue_events_url":"https://api.github.com/repos/Microsoft/BotFramework-WebChat/issues/events{/number}","events_url":"https://api.github.com/repos/Microsoft/BotFramework-WebChat/events","assignees_url":"https://api.github.com/repos/Microsoft/BotFramework-WebChat/assignees{/user}","branches_url":"https://api.github.com/repos/Microsoft/BotFramework-WebChat/branches{/branch}","tags_url":"https://api.github.com/repos/Microsoft/BotFramework-WebChat/tags","blobs_url":"https://api.github.com/repos/Microsoft/BotFramework-WebChat/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Microsoft/BotFramework-WebChat/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Microsoft/BotFramework-WebChat/git/refs{/sha}","trees_url":"https://api.github.com/repos/Microsoft/BotFramework-WebChat/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Microsoft/BotFramework-WebChat/statuses/{sha}","languages_url":"https://api.github.com/repos/Microsoft/BotFramework-WebChat/languages","stargazers_url":"https://api.github.com/repos/Microsoft/BotFramework-WebChat/stargazers","contributors_url":"https://api.github.com/repos/Microsoft/BotFramework-WebChat/contributors","subscribers_url":"https://api.github.com/repos/Microsoft/BotFramework-WebChat/subscribers","subscription_url":"https://api.github.com/repos/Microsoft/BotFramework-WebChat/subscription","commits_url":"https://api.github.com/repos/Microsoft/BotFramework-WebChat/commits{/sha}","git_commits_url":"https://api.github.com/repos/Microsoft/BotFramework-WebChat/git/commits{/sha}","comments_url":"https://api.github.com/repos/Microsoft/BotFramework-WebChat/comments{/number}","issue_comment_url":"https://api.github.com/repos/Microsoft/BotFramework-WebChat/issues/comments{/number}","contents_url":"https://api.github.com/repos/Microsoft/BotFramework-WebChat/contents/{+path}","compare_url":"https://api.github.com/repos/Microsoft/BotFramework-WebChat/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Microsoft/BotFramework-WebChat/merges","archive_url":"https://api.github.com/repos/Microsoft/BotFramework-WebChat/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Microsoft/BotFramework-WebChat/downloads","issues_url":"https://api.github.com/repos/Microsoft/BotFramework-WebChat/issues{/number}","pulls_url":"https://api.github.com/repos/Microsoft/BotFramework-WebChat/pulls{/number}","milestones_url":"https://api.github.com/repos/Microsoft/BotFramework-WebChat/milestones{/number}","notifications_url":"https://api.github.com/repos/Microsoft/BotFramework-WebChat/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Microsoft/BotFramework-WebChat/labels{/name}","releases_url":"https://api.github.com/repos/Microsoft/BotFramework-WebChat/releases{/id}","deployments_url":"https://api.github.com/repos/Microsoft/BotFramework-WebChat/deployments","created_at":"2016-07-07T23:16:57Z","updated_at":"2017-08-10T13:35:42Z","pushed_at":"2017-08-10T17:21:38Z","git_url":"git://github.com/Microsoft/BotFramework-WebChat.git","ssh_url":"git@github.com:Microsoft/BotFramework-WebChat.git","clone_url":"https://github.com/Microsoft/BotFramework-WebChat.git","svn_url":"https://github.com/Microsoft/BotFramework-WebChat","homepage":"","size":27521,"stargazers_count":246,"watchers_count":246,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":202,"mirror_url":null,"open_issues_count":90,"forks":202,"open_issues":90,"watchers":246,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Microsoft/BotFramework-WebChat/pulls/633"},"html":{"href":"https://github.com/Microsoft/BotFramework-WebChat/pull/633"},"issue":{"href":"https://api.github.com/repos/Microsoft/BotFramework-WebChat/issues/633"},"comments":{"href":"https://api.github.com/repos/Microsoft/BotFramework-WebChat/issues/633/comments"},"review_comments":{"href":"https://api.github.com/repos/Microsoft/BotFramework-WebChat/pulls/633/comments"},"review_comment":{"href":"https://api.github.com/repos/Microsoft/BotFramework-WebChat/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Microsoft/BotFramework-WebChat/pulls/633/commits"},"statuses":{"href":"https://api.github.com/repos/Microsoft/BotFramework-WebChat/statuses/24963339aa48f2bfe1a64f6e8252122d3e970ffd"}}}}
{"actor":{"display_login":"danmarshall"}}