{"action":"created","comment":{"url":"https://api.github.com/repos/UKHomeOffice/passports-template-mixins/pulls/comments/33854546","id":33854546,"diff_hunk":"@@ -95,12 +95,13 @@ module.exports = function (t, fields, options) {\n         });\n     }\n \n-    function optionGroup(key) {\n-        return {\n+    function optionGroup(key, extension) {\n+        extension = extension || {};\n+        return _.extend(extension, {\n             'key': key,\n             'error': this.errors && this.errors[key],\n-            'legend': fields[key].legend && fields[key].legend.value,\n-            'options': _.map(fields[key].options, function (obj) {\n+            'legend': fields[key] && fields[key].legend && fields[key].legend.value,","path":"lib/template-mixins.js","position":13,"original_position":13,"commit_id":"ee9b306a4cc72e22310c7194684f4e98083ef5b9","original_commit_id":"ee9b306a4cc72e22310c7194684f4e98083ef5b9","user":{"login":"JoeChapman","id":1274835,"avatar_url":"https://avatars.githubusercontent.com/u/1274835?v=3","gravatar_id":"","url":"https://api.github.com/users/JoeChapman","html_url":"https://github.com/JoeChapman","followers_url":"https://api.github.com/users/JoeChapman/followers","following_url":"https://api.github.com/users/JoeChapman/following{/other_user}","gists_url":"https://api.github.com/users/JoeChapman/gists{/gist_id}","starred_url":"https://api.github.com/users/JoeChapman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JoeChapman/subscriptions","organizations_url":"https://api.github.com/users/JoeChapman/orgs","repos_url":"https://api.github.com/users/JoeChapman/repos","events_url":"https://api.github.com/users/JoeChapman/events{/privacy}","received_events_url":"https://api.github.com/users/JoeChapman/received_events","type":"User","site_admin":false},"body":"simple test such as the following will fail:\r\nhttps://github.com/UKHomeOffice/passports-template-mixins/blob/master/test/spec.index.js#L55\r\n\r\nSo I mirrored this defensive approach: https://github.com/UKHomeOffice/passports-template-mixins/blob/master/lib/template-mixins.js#L82","created_at":"2015-07-03T10:30:19Z","updated_at":"2015-07-03T10:30:19Z","html_url":"https://github.com/UKHomeOffice/passports-template-mixins/pull/26#discussion_r33854546","pull_request_url":"https://api.github.com/repos/UKHomeOffice/passports-template-mixins/pulls/26","_links":{"self":{"href":"https://api.github.com/repos/UKHomeOffice/passports-template-mixins/pulls/comments/33854546"},"html":{"href":"https://github.com/UKHomeOffice/passports-template-mixins/pull/26#discussion_r33854546"},"pull_request":{"href":"https://api.github.com/repos/UKHomeOffice/passports-template-mixins/pulls/26"}}},"pull_request":{"url":"https://api.github.com/repos/UKHomeOffice/passports-template-mixins/pulls/26","id":39090285,"html_url":"https://github.com/UKHomeOffice/passports-template-mixins/pull/26","diff_url":"https://github.com/UKHomeOffice/passports-template-mixins/pull/26.diff","patch_url":"https://github.com/UKHomeOffice/passports-template-mixins/pull/26.patch","issue_url":"https://api.github.com/repos/UKHomeOffice/passports-template-mixins/issues/26","number":26,"state":"open","locked":false,"title":"Radio-group fieldset panel indent","user":{"login":"JoeChapman","id":1274835,"avatar_url":"https://avatars.githubusercontent.com/u/1274835?v=3","gravatar_id":"","url":"https://api.github.com/users/JoeChapman","html_url":"https://github.com/JoeChapman","followers_url":"https://api.github.com/users/JoeChapman/followers","following_url":"https://api.github.com/users/JoeChapman/following{/other_user}","gists_url":"https://api.github.com/users/JoeChapman/gists{/gist_id}","starred_url":"https://api.github.com/users/JoeChapman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JoeChapman/subscriptions","organizations_url":"https://api.github.com/users/JoeChapman/orgs","repos_url":"https://api.github.com/users/JoeChapman/repos","events_url":"https://api.github.com/users/JoeChapman/events{/privacy}","received_events_url":"https://api.github.com/users/JoeChapman/received_events","type":"User","site_admin":false},"body":"- add optional panel-indent classname to partial\r\n- get panel-indent value from fields[key]","created_at":"2015-07-02T14:47:09Z","updated_at":"2015-07-03T10:30:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7df358a9a2c2e24180aa353f89b09f2f15fe44bd","assignee":{"login":"lennym","id":117398,"avatar_url":"https://avatars.githubusercontent.com/u/117398?v=3","gravatar_id":"","url":"https://api.github.com/users/lennym","html_url":"https://github.com/lennym","followers_url":"https://api.github.com/users/lennym/followers","following_url":"https://api.github.com/users/lennym/following{/other_user}","gists_url":"https://api.github.com/users/lennym/gists{/gist_id}","starred_url":"https://api.github.com/users/lennym/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lennym/subscriptions","organizations_url":"https://api.github.com/users/lennym/orgs","repos_url":"https://api.github.com/users/lennym/repos","events_url":"https://api.github.com/users/lennym/events{/privacy}","received_events_url":"https://api.github.com/users/lennym/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/UKHomeOffice/passports-template-mixins/pulls/26/commits","review_comments_url":"https://api.github.com/repos/UKHomeOffice/passports-template-mixins/pulls/26/comments","review_comment_url":"https://api.github.com/repos/UKHomeOffice/passports-template-mixins/pulls/comments{/number}","comments_url":"https://api.github.com/repos/UKHomeOffice/passports-template-mixins/issues/26/comments","statuses_url":"https://api.github.com/repos/UKHomeOffice/passports-template-mixins/statuses/ee9b306a4cc72e22310c7194684f4e98083ef5b9","head":{"label":"UKHomeOffice:radio-group-fieldset-indent","ref":"radio-group-fieldset-indent","sha":"ee9b306a4cc72e22310c7194684f4e98083ef5b9","user":{"login":"UKHomeOffice","id":3778081,"avatar_url":"https://avatars.githubusercontent.com/u/3778081?v=3","gravatar_id":"","url":"https://api.github.com/users/UKHomeOffice","html_url":"https://github.com/UKHomeOffice","followers_url":"https://api.github.com/users/UKHomeOffice/followers","following_url":"https://api.github.com/users/UKHomeOffice/following{/other_user}","gists_url":"https://api.github.com/users/UKHomeOffice/gists{/gist_id}","starred_url":"https://api.github.com/users/UKHomeOffice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/UKHomeOffice/subscriptions","organizations_url":"https://api.github.com/users/UKHomeOffice/orgs","repos_url":"https://api.github.com/users/UKHomeOffice/repos","events_url":"https://api.github.com/users/UKHomeOffice/events{/privacy}","received_events_url":"https://api.github.com/users/UKHomeOffice/received_events","type":"Organization","site_admin":false},"repo":{"id":30700940,"name":"passports-template-mixins","full_name":"UKHomeOffice/passports-template-mixins","owner":{"login":"UKHomeOffice","id":3778081,"avatar_url":"https://avatars.githubusercontent.com/u/3778081?v=3","gravatar_id":"","url":"https://api.github.com/users/UKHomeOffice","html_url":"https://github.com/UKHomeOffice","followers_url":"https://api.github.com/users/UKHomeOffice/followers","following_url":"https://api.github.com/users/UKHomeOffice/following{/other_user}","gists_url":"https://api.github.com/users/UKHomeOffice/gists{/gist_id}","starred_url":"https://api.github.com/users/UKHomeOffice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/UKHomeOffice/subscriptions","organizations_url":"https://api.github.com/users/UKHomeOffice/orgs","repos_url":"https://api.github.com/users/UKHomeOffice/repos","events_url":"https://api.github.com/users/UKHomeOffice/events{/privacy}","received_events_url":"https://api.github.com/users/UKHomeOffice/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/UKHomeOffice/passports-template-mixins","description":"A middleware that exposes a series of Mustache mixins on res.locals to ease usage of forms, translations, and other general needs.","fork":false,"url":"https://api.github.com/repos/UKHomeOffice/passports-template-mixins","forks_url":"https://api.github.com/repos/UKHomeOffice/passports-template-mixins/forks","keys_url":"https://api.github.com/repos/UKHomeOffice/passports-template-mixins/keys{/key_id}","collaborators_url":"https://api.github.com/repos/UKHomeOffice/passports-template-mixins/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/UKHomeOffice/passports-template-mixins/teams","hooks_url":"https://api.github.com/repos/UKHomeOffice/passports-template-mixins/hooks","issue_events_url":"https://api.github.com/repos/UKHomeOffice/passports-template-mixins/issues/events{/number}","events_url":"https://api.github.com/repos/UKHomeOffice/passports-template-mixins/events","assignees_url":"https://api.github.com/repos/UKHomeOffice/passports-template-mixins/assignees{/user}","branches_url":"https://api.github.com/repos/UKHomeOffice/passports-template-mixins/branches{/branch}","tags_url":"https://api.github.com/repos/UKHomeOffice/passports-template-mixins/tags","blobs_url":"https://api.github.com/repos/UKHomeOffice/passports-template-mixins/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/UKHomeOffice/passports-template-mixins/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/UKHomeOffice/passports-template-mixins/git/refs{/sha}","trees_url":"https://api.github.com/repos/UKHomeOffice/passports-template-mixins/git/trees{/sha}","statuses_url":"https://api.github.com/repos/UKHomeOffice/passports-template-mixins/statuses/{sha}","languages_url":"https://api.github.com/repos/UKHomeOffice/passports-template-mixins/languages","stargazers_url":"https://api.github.com/repos/UKHomeOffice/passports-template-mixins/stargazers","contributors_url":"https://api.github.com/repos/UKHomeOffice/passports-template-mixins/contributors","subscribers_url":"https://api.github.com/repos/UKHomeOffice/passports-template-mixins/subscribers","subscription_url":"https://api.github.com/repos/UKHomeOffice/passports-template-mixins/subscription","commits_url":"https://api.github.com/repos/UKHomeOffice/passports-template-mixins/commits{/sha}","git_commits_url":"https://api.github.com/repos/UKHomeOffice/passports-template-mixins/git/commits{/sha}","comments_url":"https://api.github.com/repos/UKHomeOffice/passports-template-mixins/comments{/number}","issue_comment_url":"https://api.github.com/repos/UKHomeOffice/passports-template-mixins/issues/comments{/number}","contents_url":"https://api.github.com/repos/UKHomeOffice/passports-template-mixins/contents/{+path}","compare_url":"https://api.github.com/repos/UKHomeOffice/passports-template-mixins/compare/{base}...{head}","merges_url":"https://api.github.com/repos/UKHomeOffice/passports-template-mixins/merges","archive_url":"https://api.github.com/repos/UKHomeOffice/passports-template-mixins/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/UKHomeOffice/passports-template-mixins/downloads","issues_url":"https://api.github.com/repos/UKHomeOffice/passports-template-mixins/issues{/number}","pulls_url":"https://api.github.com/repos/UKHomeOffice/passports-template-mixins/pulls{/number}","milestones_url":"https://api.github.com/repos/UKHomeOffice/passports-template-mixins/milestones{/number}","notifications_url":"https://api.github.com/repos/UKHomeOffice/passports-template-mixins/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/UKHomeOffice/passports-template-mixins/labels{/name}","releases_url":"https://api.github.com/repos/UKHomeOffice/passports-template-mixins/releases{/id}","created_at":"2015-02-12T12:14:12Z","updated_at":"2015-05-07T11:41:48Z","pushed_at":"2015-07-03T10:15:19Z","git_url":"git://github.com/UKHomeOffice/passports-template-mixins.git","ssh_url":"git@github.com:UKHomeOffice/passports-template-mixins.git","clone_url":"https://github.com/UKHomeOffice/passports-template-mixins.git","svn_url":"https://github.com/UKHomeOffice/passports-template-mixins","homepage":"","size":559,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":3,"forks":1,"open_issues":3,"watchers":0,"default_branch":"master"}},"base":{"label":"UKHomeOffice:master","ref":"master","sha":"fcb7169db2073cd32b0a6b46539ad9c449577ee6","user":{"login":"UKHomeOffice","id":3778081,"avatar_url":"https://avatars.githubusercontent.com/u/3778081?v=3","gravatar_id":"","url":"https://api.github.com/users/UKHomeOffice","html_url":"https://github.com/UKHomeOffice","followers_url":"https://api.github.com/users/UKHomeOffice/followers","following_url":"https://api.github.com/users/UKHomeOffice/following{/other_user}","gists_url":"https://api.github.com/users/UKHomeOffice/gists{/gist_id}","starred_url":"https://api.github.com/users/UKHomeOffice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/UKHomeOffice/subscriptions","organizations_url":"https://api.github.com/users/UKHomeOffice/orgs","repos_url":"https://api.github.com/users/UKHomeOffice/repos","events_url":"https://api.github.com/users/UKHomeOffice/events{/privacy}","received_events_url":"https://api.github.com/users/UKHomeOffice/received_events","type":"Organization","site_admin":false},"repo":{"id":30700940,"name":"passports-template-mixins","full_name":"UKHomeOffice/passports-template-mixins","owner":{"login":"UKHomeOffice","id":3778081,"avatar_url":"https://avatars.githubusercontent.com/u/3778081?v=3","gravatar_id":"","url":"https://api.github.com/users/UKHomeOffice","html_url":"https://github.com/UKHomeOffice","followers_url":"https://api.github.com/users/UKHomeOffice/followers","following_url":"https://api.github.com/users/UKHomeOffice/following{/other_user}","gists_url":"https://api.github.com/users/UKHomeOffice/gists{/gist_id}","starred_url":"https://api.github.com/users/UKHomeOffice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/UKHomeOffice/subscriptions","organizations_url":"https://api.github.com/users/UKHomeOffice/orgs","repos_url":"https://api.github.com/users/UKHomeOffice/repos","events_url":"https://api.github.com/users/UKHomeOffice/events{/privacy}","received_events_url":"https://api.github.com/users/UKHomeOffice/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/UKHomeOffice/passports-template-mixins","description":"A middleware that exposes a series of Mustache mixins on res.locals to ease usage of forms, translations, and other general needs.","fork":false,"url":"https://api.github.com/repos/UKHomeOffice/passports-template-mixins","forks_url":"https://api.github.com/repos/UKHomeOffice/passports-template-mixins/forks","keys_url":"https://api.github.com/repos/UKHomeOffice/passports-template-mixins/keys{/key_id}","collaborators_url":"https://api.github.com/repos/UKHomeOffice/passports-template-mixins/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/UKHomeOffice/passports-template-mixins/teams","hooks_url":"https://api.github.com/repos/UKHomeOffice/passports-template-mixins/hooks","issue_events_url":"https://api.github.com/repos/UKHomeOffice/passports-template-mixins/issues/events{/number}","events_url":"https://api.github.com/repos/UKHomeOffice/passports-template-mixins/events","assignees_url":"https://api.github.com/repos/UKHomeOffice/passports-template-mixins/assignees{/user}","branches_url":"https://api.github.com/repos/UKHomeOffice/passports-template-mixins/branches{/branch}","tags_url":"https://api.github.com/repos/UKHomeOffice/passports-template-mixins/tags","blobs_url":"https://api.github.com/repos/UKHomeOffice/passports-template-mixins/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/UKHomeOffice/passports-template-mixins/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/UKHomeOffice/passports-template-mixins/git/refs{/sha}","trees_url":"https://api.github.com/repos/UKHomeOffice/passports-template-mixins/git/trees{/sha}","statuses_url":"https://api.github.com/repos/UKHomeOffice/passports-template-mixins/statuses/{sha}","languages_url":"https://api.github.com/repos/UKHomeOffice/passports-template-mixins/languages","stargazers_url":"https://api.github.com/repos/UKHomeOffice/passports-template-mixins/stargazers","contributors_url":"https://api.github.com/repos/UKHomeOffice/passports-template-mixins/contributors","subscribers_url":"https://api.github.com/repos/UKHomeOffice/passports-template-mixins/subscribers","subscription_url":"https://api.github.com/repos/UKHomeOffice/passports-template-mixins/subscription","commits_url":"https://api.github.com/repos/UKHomeOffice/passports-template-mixins/commits{/sha}","git_commits_url":"https://api.github.com/repos/UKHomeOffice/passports-template-mixins/git/commits{/sha}","comments_url":"https://api.github.com/repos/UKHomeOffice/passports-template-mixins/comments{/number}","issue_comment_url":"https://api.github.com/repos/UKHomeOffice/passports-template-mixins/issues/comments{/number}","contents_url":"https://api.github.com/repos/UKHomeOffice/passports-template-mixins/contents/{+path}","compare_url":"https://api.github.com/repos/UKHomeOffice/passports-template-mixins/compare/{base}...{head}","merges_url":"https://api.github.com/repos/UKHomeOffice/passports-template-mixins/merges","archive_url":"https://api.github.com/repos/UKHomeOffice/passports-template-mixins/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/UKHomeOffice/passports-template-mixins/downloads","issues_url":"https://api.github.com/repos/UKHomeOffice/passports-template-mixins/issues{/number}","pulls_url":"https://api.github.com/repos/UKHomeOffice/passports-template-mixins/pulls{/number}","milestones_url":"https://api.github.com/repos/UKHomeOffice/passports-template-mixins/milestones{/number}","notifications_url":"https://api.github.com/repos/UKHomeOffice/passports-template-mixins/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/UKHomeOffice/passports-template-mixins/labels{/name}","releases_url":"https://api.github.com/repos/UKHomeOffice/passports-template-mixins/releases{/id}","created_at":"2015-02-12T12:14:12Z","updated_at":"2015-05-07T11:41:48Z","pushed_at":"2015-07-03T10:15:19Z","git_url":"git://github.com/UKHomeOffice/passports-template-mixins.git","ssh_url":"git@github.com:UKHomeOffice/passports-template-mixins.git","clone_url":"https://github.com/UKHomeOffice/passports-template-mixins.git","svn_url":"https://github.com/UKHomeOffice/passports-template-mixins","homepage":"","size":559,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":3,"forks":1,"open_issues":3,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/UKHomeOffice/passports-template-mixins/pulls/26"},"html":{"href":"https://github.com/UKHomeOffice/passports-template-mixins/pull/26"},"issue":{"href":"https://api.github.com/repos/UKHomeOffice/passports-template-mixins/issues/26"},"comments":{"href":"https://api.github.com/repos/UKHomeOffice/passports-template-mixins/issues/26/comments"},"review_comments":{"href":"https://api.github.com/repos/UKHomeOffice/passports-template-mixins/pulls/26/comments"},"review_comment":{"href":"https://api.github.com/repos/UKHomeOffice/passports-template-mixins/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/UKHomeOffice/passports-template-mixins/pulls/26/commits"},"statuses":{"href":"https://api.github.com/repos/UKHomeOffice/passports-template-mixins/statuses/ee9b306a4cc72e22310c7194684f4e98083ef5b9"}}}}