{"action":"opened","number":343,"pull_request":{"url":"https://api.github.com/repos/75team/thinkjs/pulls/343","id":68312160,"html_url":"https://github.com/75team/thinkjs/pull/343","diff_url":"https://github.com/75team/thinkjs/pull/343.diff","patch_url":"https://github.com/75team/thinkjs/pull/343.patch","issue_url":"https://api.github.com/repos/75team/thinkjs/issues/343","number":343,"state":"open","locked":false,"title":"Check view_parse result","user":{"login":"snadn","id":1269858,"avatar_url":"https://avatars.githubusercontent.com/u/1269858?v=3","gravatar_id":"","url":"https://api.github.com/users/snadn","html_url":"https://github.com/snadn","followers_url":"https://api.github.com/users/snadn/followers","following_url":"https://api.github.com/users/snadn/following{/other_user}","gists_url":"https://api.github.com/users/snadn/gists{/gist_id}","starred_url":"https://api.github.com/users/snadn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/snadn/subscriptions","organizations_url":"https://api.github.com/users/snadn/orgs","repos_url":"https://api.github.com/users/snadn/repos","events_url":"https://api.github.com/users/snadn/events{/privacy}","received_events_url":"https://api.github.com/users/snadn/received_events","type":"User","site_admin":false},"body":"hook 在中间件返回值为undefined时，会返回传入的参数。\r\n所以当template返回undefined时，content 为传入的对象，切后续的序列化会报错。\r\n\r\n这里仅简单添加判断将其设置为空字符串。\r\n\r\n也可以考虑将处理逻辑放入hook的执行中，为其添加默认返回值参数。","created_at":"2016-04-29T00:43:19Z","updated_at":"2016-04-29T00:43:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/75team/thinkjs/pulls/343/commits","review_comments_url":"https://api.github.com/repos/75team/thinkjs/pulls/343/comments","review_comment_url":"https://api.github.com/repos/75team/thinkjs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/75team/thinkjs/issues/343/comments","statuses_url":"https://api.github.com/repos/75team/thinkjs/statuses/0c9aa0c670a91d6b5d1f5c6b892161cf8fb2ce70","head":{"label":"snadn:check_view_parse_result","ref":"check_view_parse_result","sha":"0c9aa0c670a91d6b5d1f5c6b892161cf8fb2ce70","user":{"login":"snadn","id":1269858,"avatar_url":"https://avatars.githubusercontent.com/u/1269858?v=3","gravatar_id":"","url":"https://api.github.com/users/snadn","html_url":"https://github.com/snadn","followers_url":"https://api.github.com/users/snadn/followers","following_url":"https://api.github.com/users/snadn/following{/other_user}","gists_url":"https://api.github.com/users/snadn/gists{/gist_id}","starred_url":"https://api.github.com/users/snadn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/snadn/subscriptions","organizations_url":"https://api.github.com/users/snadn/orgs","repos_url":"https://api.github.com/users/snadn/repos","events_url":"https://api.github.com/users/snadn/events{/privacy}","received_events_url":"https://api.github.com/users/snadn/received_events","type":"User","site_admin":false},"repo":{"id":26791443,"name":"thinkjs","full_name":"snadn/thinkjs","owner":{"login":"snadn","id":1269858,"avatar_url":"https://avatars.githubusercontent.com/u/1269858?v=3","gravatar_id":"","url":"https://api.github.com/users/snadn","html_url":"https://github.com/snadn","followers_url":"https://api.github.com/users/snadn/followers","following_url":"https://api.github.com/users/snadn/following{/other_user}","gists_url":"https://api.github.com/users/snadn/gists{/gist_id}","starred_url":"https://api.github.com/users/snadn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/snadn/subscriptions","organizations_url":"https://api.github.com/users/snadn/orgs","repos_url":"https://api.github.com/users/snadn/repos","events_url":"https://api.github.com/users/snadn/events{/privacy}","received_events_url":"https://api.github.com/users/snadn/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/snadn/thinkjs","description":"基于Promise的Node.js MVC框架","fork":true,"url":"https://api.github.com/repos/snadn/thinkjs","forks_url":"https://api.github.com/repos/snadn/thinkjs/forks","keys_url":"https://api.github.com/repos/snadn/thinkjs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/snadn/thinkjs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/snadn/thinkjs/teams","hooks_url":"https://api.github.com/repos/snadn/thinkjs/hooks","issue_events_url":"https://api.github.com/repos/snadn/thinkjs/issues/events{/number}","events_url":"https://api.github.com/repos/snadn/thinkjs/events","assignees_url":"https://api.github.com/repos/snadn/thinkjs/assignees{/user}","branches_url":"https://api.github.com/repos/snadn/thinkjs/branches{/branch}","tags_url":"https://api.github.com/repos/snadn/thinkjs/tags","blobs_url":"https://api.github.com/repos/snadn/thinkjs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/snadn/thinkjs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/snadn/thinkjs/git/refs{/sha}","trees_url":"https://api.github.com/repos/snadn/thinkjs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/snadn/thinkjs/statuses/{sha}","languages_url":"https://api.github.com/repos/snadn/thinkjs/languages","stargazers_url":"https://api.github.com/repos/snadn/thinkjs/stargazers","contributors_url":"https://api.github.com/repos/snadn/thinkjs/contributors","subscribers_url":"https://api.github.com/repos/snadn/thinkjs/subscribers","subscription_url":"https://api.github.com/repos/snadn/thinkjs/subscription","commits_url":"https://api.github.com/repos/snadn/thinkjs/commits{/sha}","git_commits_url":"https://api.github.com/repos/snadn/thinkjs/git/commits{/sha}","comments_url":"https://api.github.com/repos/snadn/thinkjs/comments{/number}","issue_comment_url":"https://api.github.com/repos/snadn/thinkjs/issues/comments{/number}","contents_url":"https://api.github.com/repos/snadn/thinkjs/contents/{+path}","compare_url":"https://api.github.com/repos/snadn/thinkjs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/snadn/thinkjs/merges","archive_url":"https://api.github.com/repos/snadn/thinkjs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/snadn/thinkjs/downloads","issues_url":"https://api.github.com/repos/snadn/thinkjs/issues{/number}","pulls_url":"https://api.github.com/repos/snadn/thinkjs/pulls{/number}","milestones_url":"https://api.github.com/repos/snadn/thinkjs/milestones{/number}","notifications_url":"https://api.github.com/repos/snadn/thinkjs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/snadn/thinkjs/labels{/name}","releases_url":"https://api.github.com/repos/snadn/thinkjs/releases{/id}","deployments_url":"https://api.github.com/repos/snadn/thinkjs/deployments","created_at":"2014-11-18T04:10:09Z","updated_at":"2016-04-28T08:39:35Z","pushed_at":"2016-04-29T00:37:46Z","git_url":"git://github.com/snadn/thinkjs.git","ssh_url":"git@github.com:snadn/thinkjs.git","clone_url":"https://github.com/snadn/thinkjs.git","svn_url":"https://github.com/snadn/thinkjs","homepage":"http://www.thinkjs.org/","size":6596,"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":"75team:master","ref":"master","sha":"782569da58595eb7c64476c10c094b8659698299","user":{"login":"75team","id":5575368,"avatar_url":"https://avatars.githubusercontent.com/u/5575368?v=3","gravatar_id":"","url":"https://api.github.com/users/75team","html_url":"https://github.com/75team","followers_url":"https://api.github.com/users/75team/followers","following_url":"https://api.github.com/users/75team/following{/other_user}","gists_url":"https://api.github.com/users/75team/gists{/gist_id}","starred_url":"https://api.github.com/users/75team/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/75team/subscriptions","organizations_url":"https://api.github.com/users/75team/orgs","repos_url":"https://api.github.com/users/75team/repos","events_url":"https://api.github.com/users/75team/events{/privacy}","received_events_url":"https://api.github.com/users/75team/received_events","type":"Organization","site_admin":false},"repo":{"id":13152531,"name":"thinkjs","full_name":"75team/thinkjs","owner":{"login":"75team","id":5575368,"avatar_url":"https://avatars.githubusercontent.com/u/5575368?v=3","gravatar_id":"","url":"https://api.github.com/users/75team","html_url":"https://github.com/75team","followers_url":"https://api.github.com/users/75team/followers","following_url":"https://api.github.com/users/75team/following{/other_user}","gists_url":"https://api.github.com/users/75team/gists{/gist_id}","starred_url":"https://api.github.com/users/75team/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/75team/subscriptions","organizations_url":"https://api.github.com/users/75team/orgs","repos_url":"https://api.github.com/users/75team/repos","events_url":"https://api.github.com/users/75team/events{/privacy}","received_events_url":"https://api.github.com/users/75team/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/75team/thinkjs","description":"Use full ES2015+ features to develop Node.js applications, Support TypeScript","fork":false,"url":"https://api.github.com/repos/75team/thinkjs","forks_url":"https://api.github.com/repos/75team/thinkjs/forks","keys_url":"https://api.github.com/repos/75team/thinkjs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/75team/thinkjs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/75team/thinkjs/teams","hooks_url":"https://api.github.com/repos/75team/thinkjs/hooks","issue_events_url":"https://api.github.com/repos/75team/thinkjs/issues/events{/number}","events_url":"https://api.github.com/repos/75team/thinkjs/events","assignees_url":"https://api.github.com/repos/75team/thinkjs/assignees{/user}","branches_url":"https://api.github.com/repos/75team/thinkjs/branches{/branch}","tags_url":"https://api.github.com/repos/75team/thinkjs/tags","blobs_url":"https://api.github.com/repos/75team/thinkjs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/75team/thinkjs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/75team/thinkjs/git/refs{/sha}","trees_url":"https://api.github.com/repos/75team/thinkjs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/75team/thinkjs/statuses/{sha}","languages_url":"https://api.github.com/repos/75team/thinkjs/languages","stargazers_url":"https://api.github.com/repos/75team/thinkjs/stargazers","contributors_url":"https://api.github.com/repos/75team/thinkjs/contributors","subscribers_url":"https://api.github.com/repos/75team/thinkjs/subscribers","subscription_url":"https://api.github.com/repos/75team/thinkjs/subscription","commits_url":"https://api.github.com/repos/75team/thinkjs/commits{/sha}","git_commits_url":"https://api.github.com/repos/75team/thinkjs/git/commits{/sha}","comments_url":"https://api.github.com/repos/75team/thinkjs/comments{/number}","issue_comment_url":"https://api.github.com/repos/75team/thinkjs/issues/comments{/number}","contents_url":"https://api.github.com/repos/75team/thinkjs/contents/{+path}","compare_url":"https://api.github.com/repos/75team/thinkjs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/75team/thinkjs/merges","archive_url":"https://api.github.com/repos/75team/thinkjs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/75team/thinkjs/downloads","issues_url":"https://api.github.com/repos/75team/thinkjs/issues{/number}","pulls_url":"https://api.github.com/repos/75team/thinkjs/pulls{/number}","milestones_url":"https://api.github.com/repos/75team/thinkjs/milestones{/number}","notifications_url":"https://api.github.com/repos/75team/thinkjs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/75team/thinkjs/labels{/name}","releases_url":"https://api.github.com/repos/75team/thinkjs/releases{/id}","deployments_url":"https://api.github.com/repos/75team/thinkjs/deployments","created_at":"2013-09-27T14:28:04Z","updated_at":"2016-04-28T12:42:19Z","pushed_at":"2016-04-27T12:13:26Z","git_url":"git://github.com/75team/thinkjs.git","ssh_url":"git@github.com:75team/thinkjs.git","clone_url":"https://github.com/75team/thinkjs.git","svn_url":"https://github.com/75team/thinkjs","homepage":"http://www.thinkjs.org/","size":7635,"stargazers_count":1504,"watchers_count":1504,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":291,"mirror_url":null,"open_issues_count":19,"forks":291,"open_issues":19,"watchers":1504,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/75team/thinkjs/pulls/343"},"html":{"href":"https://github.com/75team/thinkjs/pull/343"},"issue":{"href":"https://api.github.com/repos/75team/thinkjs/issues/343"},"comments":{"href":"https://api.github.com/repos/75team/thinkjs/issues/343/comments"},"review_comments":{"href":"https://api.github.com/repos/75team/thinkjs/pulls/343/comments"},"review_comment":{"href":"https://api.github.com/repos/75team/thinkjs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/75team/thinkjs/pulls/343/commits"},"statuses":{"href":"https://api.github.com/repos/75team/thinkjs/statuses/0c9aa0c670a91d6b5d1f5c6b892161cf8fb2ce70"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":4,"additions":8,"deletions":2,"changed_files":1}}