{"action":"created","comment":{"url":"https://api.github.com/repos/Azure/azure-xplat-cli/pulls/comments/83113656","pull_request_review_id":3976164,"id":83113656,"diff_hunk":"@@ -190,6 +190,18 @@ __.extend(VMProfile.prototype, {\n       }\n       virtualMachine.storageProfile.osDisk.diskSizeGB = parseInt(this.params.newOsDiskSize);\n     }\n+    \n+    if (virtualMachine.networkProfile !== null && virtualMachine.networkProfile.networkInterfaces !== null) {","path":"lib/commands/arm/vm/vmProfile._js","position":5,"original_position":5,"commit_id":"15fe7fd553f88974351b1fb90d7705e041d665a0","original_commit_id":"15fe7fd553f88974351b1fb90d7705e041d665a0","user":{"login":"amarzavery","id":4521223,"avatar_url":"https://avatars.githubusercontent.com/u/4521223?v=3","gravatar_id":"","url":"https://api.github.com/users/amarzavery","html_url":"https://github.com/amarzavery","followers_url":"https://api.github.com/users/amarzavery/followers","following_url":"https://api.github.com/users/amarzavery/following{/other_user}","gists_url":"https://api.github.com/users/amarzavery/gists{/gist_id}","starred_url":"https://api.github.com/users/amarzavery/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amarzavery/subscriptions","organizations_url":"https://api.github.com/users/amarzavery/orgs","repos_url":"https://api.github.com/users/amarzavery/repos","events_url":"https://api.github.com/users/amarzavery/events{/privacy}","received_events_url":"https://api.github.com/users/amarzavery/received_events","type":"User","site_admin":false},"body":"what if virtualMachine.networkProfile === undefined ? and virtualMachine.networkProfile.networkInterfaces === undefined, you should explicitly check for both null and undefined. If you know that networkProfile and networkInterfaces are both objects then it is safe to say the following\r\n```\r\nif (virtualMachine.networkProfile && virtualMachine.networkProfile.networkInterfaces) {\r\n```","created_at":"2016-10-12T22:37:10Z","updated_at":"2016-10-12T22:37:10Z","html_url":"https://github.com/Azure/azure-xplat-cli/pull/3250#discussion_r83113656","pull_request_url":"https://api.github.com/repos/Azure/azure-xplat-cli/pulls/3250","_links":{"self":{"href":"https://api.github.com/repos/Azure/azure-xplat-cli/pulls/comments/83113656"},"html":{"href":"https://github.com/Azure/azure-xplat-cli/pull/3250#discussion_r83113656"},"pull_request":{"href":"https://api.github.com/repos/Azure/azure-xplat-cli/pulls/3250"}}},"pull_request":{"url":"https://api.github.com/repos/Azure/azure-xplat-cli/pulls/3250","id":88965915,"html_url":"https://github.com/Azure/azure-xplat-cli/pull/3250","diff_url":"https://github.com/Azure/azure-xplat-cli/pull/3250.diff","patch_url":"https://github.com/Azure/azure-xplat-cli/pull/3250.patch","issue_url":"https://api.github.com/repos/Azure/azure-xplat-cli/issues/3250","number":3250,"state":"open","locked":false,"title":"Fix #3248 on VM command's end.","user":{"login":"huangpf","id":3858524,"avatar_url":"https://avatars.githubusercontent.com/u/3858524?v=3","gravatar_id":"","url":"https://api.github.com/users/huangpf","html_url":"https://github.com/huangpf","followers_url":"https://api.github.com/users/huangpf/followers","following_url":"https://api.github.com/users/huangpf/following{/other_user}","gists_url":"https://api.github.com/users/huangpf/gists{/gist_id}","starred_url":"https://api.github.com/users/huangpf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/huangpf/subscriptions","organizations_url":"https://api.github.com/users/huangpf/orgs","repos_url":"https://api.github.com/users/huangpf/repos","events_url":"https://api.github.com/users/huangpf/events{/privacy}","received_events_url":"https://api.github.com/users/huangpf/received_events","type":"User","site_admin":false},"body":"@amarzavery @haocs Could you please help review? Thanks.","created_at":"2016-10-12T07:27:44Z","updated_at":"2016-10-12T22:37:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f84aac3ab800ac10b59fcdb9a2091bcd26f37b7f","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/Azure/azure-xplat-cli/pulls/3250/commits","review_comments_url":"https://api.github.com/repos/Azure/azure-xplat-cli/pulls/3250/comments","review_comment_url":"https://api.github.com/repos/Azure/azure-xplat-cli/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Azure/azure-xplat-cli/issues/3250/comments","statuses_url":"https://api.github.com/repos/Azure/azure-xplat-cli/statuses/15fe7fd553f88974351b1fb90d7705e041d665a0","head":{"label":"huangpf:dev","ref":"dev","sha":"15fe7fd553f88974351b1fb90d7705e041d665a0","user":{"login":"huangpf","id":3858524,"avatar_url":"https://avatars.githubusercontent.com/u/3858524?v=3","gravatar_id":"","url":"https://api.github.com/users/huangpf","html_url":"https://github.com/huangpf","followers_url":"https://api.github.com/users/huangpf/followers","following_url":"https://api.github.com/users/huangpf/following{/other_user}","gists_url":"https://api.github.com/users/huangpf/gists{/gist_id}","starred_url":"https://api.github.com/users/huangpf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/huangpf/subscriptions","organizations_url":"https://api.github.com/users/huangpf/orgs","repos_url":"https://api.github.com/users/huangpf/repos","events_url":"https://api.github.com/users/huangpf/events{/privacy}","received_events_url":"https://api.github.com/users/huangpf/received_events","type":"User","site_admin":false},"repo":{"id":35979267,"name":"azure-xplat-cli","full_name":"huangpf/azure-xplat-cli","owner":{"login":"huangpf","id":3858524,"avatar_url":"https://avatars.githubusercontent.com/u/3858524?v=3","gravatar_id":"","url":"https://api.github.com/users/huangpf","html_url":"https://github.com/huangpf","followers_url":"https://api.github.com/users/huangpf/followers","following_url":"https://api.github.com/users/huangpf/following{/other_user}","gists_url":"https://api.github.com/users/huangpf/gists{/gist_id}","starred_url":"https://api.github.com/users/huangpf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/huangpf/subscriptions","organizations_url":"https://api.github.com/users/huangpf/orgs","repos_url":"https://api.github.com/users/huangpf/repos","events_url":"https://api.github.com/users/huangpf/events{/privacy}","received_events_url":"https://api.github.com/users/huangpf/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/huangpf/azure-xplat-cli","description":"Microsoft Azure Cross Platform Command Line","fork":true,"url":"https://api.github.com/repos/huangpf/azure-xplat-cli","forks_url":"https://api.github.com/repos/huangpf/azure-xplat-cli/forks","keys_url":"https://api.github.com/repos/huangpf/azure-xplat-cli/keys{/key_id}","collaborators_url":"https://api.github.com/repos/huangpf/azure-xplat-cli/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/huangpf/azure-xplat-cli/teams","hooks_url":"https://api.github.com/repos/huangpf/azure-xplat-cli/hooks","issue_events_url":"https://api.github.com/repos/huangpf/azure-xplat-cli/issues/events{/number}","events_url":"https://api.github.com/repos/huangpf/azure-xplat-cli/events","assignees_url":"https://api.github.com/repos/huangpf/azure-xplat-cli/assignees{/user}","branches_url":"https://api.github.com/repos/huangpf/azure-xplat-cli/branches{/branch}","tags_url":"https://api.github.com/repos/huangpf/azure-xplat-cli/tags","blobs_url":"https://api.github.com/repos/huangpf/azure-xplat-cli/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/huangpf/azure-xplat-cli/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/huangpf/azure-xplat-cli/git/refs{/sha}","trees_url":"https://api.github.com/repos/huangpf/azure-xplat-cli/git/trees{/sha}","statuses_url":"https://api.github.com/repos/huangpf/azure-xplat-cli/statuses/{sha}","languages_url":"https://api.github.com/repos/huangpf/azure-xplat-cli/languages","stargazers_url":"https://api.github.com/repos/huangpf/azure-xplat-cli/stargazers","contributors_url":"https://api.github.com/repos/huangpf/azure-xplat-cli/contributors","subscribers_url":"https://api.github.com/repos/huangpf/azure-xplat-cli/subscribers","subscription_url":"https://api.github.com/repos/huangpf/azure-xplat-cli/subscription","commits_url":"https://api.github.com/repos/huangpf/azure-xplat-cli/commits{/sha}","git_commits_url":"https://api.github.com/repos/huangpf/azure-xplat-cli/git/commits{/sha}","comments_url":"https://api.github.com/repos/huangpf/azure-xplat-cli/comments{/number}","issue_comment_url":"https://api.github.com/repos/huangpf/azure-xplat-cli/issues/comments{/number}","contents_url":"https://api.github.com/repos/huangpf/azure-xplat-cli/contents/{+path}","compare_url":"https://api.github.com/repos/huangpf/azure-xplat-cli/compare/{base}...{head}","merges_url":"https://api.github.com/repos/huangpf/azure-xplat-cli/merges","archive_url":"https://api.github.com/repos/huangpf/azure-xplat-cli/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/huangpf/azure-xplat-cli/downloads","issues_url":"https://api.github.com/repos/huangpf/azure-xplat-cli/issues{/number}","pulls_url":"https://api.github.com/repos/huangpf/azure-xplat-cli/pulls{/number}","milestones_url":"https://api.github.com/repos/huangpf/azure-xplat-cli/milestones{/number}","notifications_url":"https://api.github.com/repos/huangpf/azure-xplat-cli/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/huangpf/azure-xplat-cli/labels{/name}","releases_url":"https://api.github.com/repos/huangpf/azure-xplat-cli/releases{/id}","deployments_url":"https://api.github.com/repos/huangpf/azure-xplat-cli/deployments","created_at":"2015-05-20T23:17:00Z","updated_at":"2016-01-12T17:47:32Z","pushed_at":"2016-10-12T07:26:37Z","git_url":"git://github.com/huangpf/azure-xplat-cli.git","ssh_url":"git@github.com:huangpf/azure-xplat-cli.git","clone_url":"https://github.com/huangpf/azure-xplat-cli.git","svn_url":"https://github.com/huangpf/azure-xplat-cli","homepage":"","size":92791,"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":"dev"}},"base":{"label":"Azure:dev","ref":"dev","sha":"6ba2b1c0093d268c0b61363f64cc002091fa274f","user":{"login":"Azure","id":6844498,"avatar_url":"https://avatars.githubusercontent.com/u/6844498?v=3","gravatar_id":"","url":"https://api.github.com/users/Azure","html_url":"https://github.com/Azure","followers_url":"https://api.github.com/users/Azure/followers","following_url":"https://api.github.com/users/Azure/following{/other_user}","gists_url":"https://api.github.com/users/Azure/gists{/gist_id}","starred_url":"https://api.github.com/users/Azure/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Azure/subscriptions","organizations_url":"https://api.github.com/users/Azure/orgs","repos_url":"https://api.github.com/users/Azure/repos","events_url":"https://api.github.com/users/Azure/events{/privacy}","received_events_url":"https://api.github.com/users/Azure/received_events","type":"Organization","site_admin":false},"repo":{"id":6506651,"name":"azure-xplat-cli","full_name":"Azure/azure-xplat-cli","owner":{"login":"Azure","id":6844498,"avatar_url":"https://avatars.githubusercontent.com/u/6844498?v=3","gravatar_id":"","url":"https://api.github.com/users/Azure","html_url":"https://github.com/Azure","followers_url":"https://api.github.com/users/Azure/followers","following_url":"https://api.github.com/users/Azure/following{/other_user}","gists_url":"https://api.github.com/users/Azure/gists{/gist_id}","starred_url":"https://api.github.com/users/Azure/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Azure/subscriptions","organizations_url":"https://api.github.com/users/Azure/orgs","repos_url":"https://api.github.com/users/Azure/repos","events_url":"https://api.github.com/users/Azure/events{/privacy}","received_events_url":"https://api.github.com/users/Azure/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Azure/azure-xplat-cli","description":"Microsoft Azure Cross Platform Command Line","fork":false,"url":"https://api.github.com/repos/Azure/azure-xplat-cli","forks_url":"https://api.github.com/repos/Azure/azure-xplat-cli/forks","keys_url":"https://api.github.com/repos/Azure/azure-xplat-cli/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Azure/azure-xplat-cli/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Azure/azure-xplat-cli/teams","hooks_url":"https://api.github.com/repos/Azure/azure-xplat-cli/hooks","issue_events_url":"https://api.github.com/repos/Azure/azure-xplat-cli/issues/events{/number}","events_url":"https://api.github.com/repos/Azure/azure-xplat-cli/events","assignees_url":"https://api.github.com/repos/Azure/azure-xplat-cli/assignees{/user}","branches_url":"https://api.github.com/repos/Azure/azure-xplat-cli/branches{/branch}","tags_url":"https://api.github.com/repos/Azure/azure-xplat-cli/tags","blobs_url":"https://api.github.com/repos/Azure/azure-xplat-cli/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Azure/azure-xplat-cli/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Azure/azure-xplat-cli/git/refs{/sha}","trees_url":"https://api.github.com/repos/Azure/azure-xplat-cli/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Azure/azure-xplat-cli/statuses/{sha}","languages_url":"https://api.github.com/repos/Azure/azure-xplat-cli/languages","stargazers_url":"https://api.github.com/repos/Azure/azure-xplat-cli/stargazers","contributors_url":"https://api.github.com/repos/Azure/azure-xplat-cli/contributors","subscribers_url":"https://api.github.com/repos/Azure/azure-xplat-cli/subscribers","subscription_url":"https://api.github.com/repos/Azure/azure-xplat-cli/subscription","commits_url":"https://api.github.com/repos/Azure/azure-xplat-cli/commits{/sha}","git_commits_url":"https://api.github.com/repos/Azure/azure-xplat-cli/git/commits{/sha}","comments_url":"https://api.github.com/repos/Azure/azure-xplat-cli/comments{/number}","issue_comment_url":"https://api.github.com/repos/Azure/azure-xplat-cli/issues/comments{/number}","contents_url":"https://api.github.com/repos/Azure/azure-xplat-cli/contents/{+path}","compare_url":"https://api.github.com/repos/Azure/azure-xplat-cli/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Azure/azure-xplat-cli/merges","archive_url":"https://api.github.com/repos/Azure/azure-xplat-cli/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Azure/azure-xplat-cli/downloads","issues_url":"https://api.github.com/repos/Azure/azure-xplat-cli/issues{/number}","pulls_url":"https://api.github.com/repos/Azure/azure-xplat-cli/pulls{/number}","milestones_url":"https://api.github.com/repos/Azure/azure-xplat-cli/milestones{/number}","notifications_url":"https://api.github.com/repos/Azure/azure-xplat-cli/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Azure/azure-xplat-cli/labels{/name}","releases_url":"https://api.github.com/repos/Azure/azure-xplat-cli/releases{/id}","deployments_url":"https://api.github.com/repos/Azure/azure-xplat-cli/deployments","created_at":"2012-11-02T13:43:50Z","updated_at":"2016-10-11T06:28:17Z","pushed_at":"2016-10-12T19:20:14Z","git_url":"git://github.com/Azure/azure-xplat-cli.git","ssh_url":"git@github.com:Azure/azure-xplat-cli.git","clone_url":"https://github.com/Azure/azure-xplat-cli.git","svn_url":"https://github.com/Azure/azure-xplat-cli","homepage":"","size":104987,"stargazers_count":487,"watchers_count":487,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":351,"mirror_url":null,"open_issues_count":192,"forks":351,"open_issues":192,"watchers":487,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/Azure/azure-xplat-cli/pulls/3250"},"html":{"href":"https://github.com/Azure/azure-xplat-cli/pull/3250"},"issue":{"href":"https://api.github.com/repos/Azure/azure-xplat-cli/issues/3250"},"comments":{"href":"https://api.github.com/repos/Azure/azure-xplat-cli/issues/3250/comments"},"review_comments":{"href":"https://api.github.com/repos/Azure/azure-xplat-cli/pulls/3250/comments"},"review_comment":{"href":"https://api.github.com/repos/Azure/azure-xplat-cli/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Azure/azure-xplat-cli/pulls/3250/commits"},"statuses":{"href":"https://api.github.com/repos/Azure/azure-xplat-cli/statuses/15fe7fd553f88974351b1fb90d7705e041d665a0"}}}}
{"actor":{"display_login":"amarzavery"}}