{"action":"created","comment":{"url":"https://api.github.com/repos/uber/zero-config/pulls/comments/34518097","id":34518097,"diff_hunk":"@@ -20,10 +20,20 @@ function ConfigWrapper(configObject, loose) {\n \n     function getKey(keyPath) {\n         if (!keyPath) {\n-            return configObject;\n+            return deepExtend({}, configObject);\n         }\n \n-        return getPath(configObject, keyPath);\n+        // Clone non-primitives before returning\n+        var val = getPath(configObject, keyPath);\n+        if (typeof val === 'object') {\n+            if (Array.isArray(val)) {\n+                val = [].concat(val);","path":"config-wrapper.js","position":13,"original_position":13,"commit_id":"58ac5bc82d478a5c81ca725de7a5913562e39513","original_commit_id":"58ac5bc82d478a5c81ca725de7a5913562e39513","user":{"login":"lxe","id":1486609,"avatar_url":"https://avatars.githubusercontent.com/u/1486609?v=3","gravatar_id":"","url":"https://api.github.com/users/lxe","html_url":"https://github.com/lxe","followers_url":"https://api.github.com/users/lxe/followers","following_url":"https://api.github.com/users/lxe/following{/other_user}","gists_url":"https://api.github.com/users/lxe/gists{/gist_id}","starred_url":"https://api.github.com/users/lxe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lxe/subscriptions","organizations_url":"https://api.github.com/users/lxe/orgs","repos_url":"https://api.github.com/users/lxe/repos","events_url":"https://api.github.com/users/lxe/events{/privacy}","received_events_url":"https://api.github.com/users/lxe/received_events","type":"User","site_admin":false},"body":"You are correct. I'll just use deep-extend.","created_at":"2015-07-13T22:10:34Z","updated_at":"2015-07-13T22:10:34Z","html_url":"https://github.com/uber/zero-config/pull/30#discussion_r34518097","pull_request_url":"https://api.github.com/repos/uber/zero-config/pulls/30","_links":{"self":{"href":"https://api.github.com/repos/uber/zero-config/pulls/comments/34518097"},"html":{"href":"https://github.com/uber/zero-config/pull/30#discussion_r34518097"},"pull_request":{"href":"https://api.github.com/repos/uber/zero-config/pulls/30"}}},"pull_request":{"url":"https://api.github.com/repos/uber/zero-config/pulls/30","id":39843204,"html_url":"https://github.com/uber/zero-config/pull/30","diff_url":"https://github.com/uber/zero-config/pull/30.diff","patch_url":"https://github.com/uber/zero-config/pull/30.patch","issue_url":"https://api.github.com/repos/uber/zero-config/issues/30","number":30,"state":"open","locked":false,"title":"clone non-primitives before returning result of .get()","user":{"login":"lxe","id":1486609,"avatar_url":"https://avatars.githubusercontent.com/u/1486609?v=3","gravatar_id":"","url":"https://api.github.com/users/lxe","html_url":"https://github.com/lxe","followers_url":"https://api.github.com/users/lxe/followers","following_url":"https://api.github.com/users/lxe/following{/other_user}","gists_url":"https://api.github.com/users/lxe/gists{/gist_id}","starred_url":"https://api.github.com/users/lxe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lxe/subscriptions","organizations_url":"https://api.github.com/users/lxe/orgs","repos_url":"https://api.github.com/users/lxe/repos","events_url":"https://api.github.com/users/lxe/events{/privacy}","received_events_url":"https://api.github.com/users/lxe/received_events","type":"User","site_admin":false},"body":"Fixes #29\r\n\r\ncc @Raynos ","created_at":"2015-07-13T18:49:10Z","updated_at":"2015-07-13T22:10:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b6518210885e73ba4261da51ccc7a76ec8a42f0b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/uber/zero-config/pulls/30/commits","review_comments_url":"https://api.github.com/repos/uber/zero-config/pulls/30/comments","review_comment_url":"https://api.github.com/repos/uber/zero-config/pulls/comments{/number}","comments_url":"https://api.github.com/repos/uber/zero-config/issues/30/comments","statuses_url":"https://api.github.com/repos/uber/zero-config/statuses/58ac5bc82d478a5c81ca725de7a5913562e39513","head":{"label":"uber:do-not-mutate","ref":"do-not-mutate","sha":"58ac5bc82d478a5c81ca725de7a5913562e39513","user":{"login":"uber","id":538264,"avatar_url":"https://avatars.githubusercontent.com/u/538264?v=3","gravatar_id":"","url":"https://api.github.com/users/uber","html_url":"https://github.com/uber","followers_url":"https://api.github.com/users/uber/followers","following_url":"https://api.github.com/users/uber/following{/other_user}","gists_url":"https://api.github.com/users/uber/gists{/gist_id}","starred_url":"https://api.github.com/users/uber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uber/subscriptions","organizations_url":"https://api.github.com/users/uber/orgs","repos_url":"https://api.github.com/users/uber/repos","events_url":"https://api.github.com/users/uber/events{/privacy}","received_events_url":"https://api.github.com/users/uber/received_events","type":"Organization","site_admin":false},"repo":{"id":23033945,"name":"zero-config","full_name":"uber/zero-config","owner":{"login":"uber","id":538264,"avatar_url":"https://avatars.githubusercontent.com/u/538264?v=3","gravatar_id":"","url":"https://api.github.com/users/uber","html_url":"https://github.com/uber","followers_url":"https://api.github.com/users/uber/followers","following_url":"https://api.github.com/users/uber/following{/other_user}","gists_url":"https://api.github.com/users/uber/gists{/gist_id}","starred_url":"https://api.github.com/users/uber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uber/subscriptions","organizations_url":"https://api.github.com/users/uber/orgs","repos_url":"https://api.github.com/users/uber/repos","events_url":"https://api.github.com/users/uber/events{/privacy}","received_events_url":"https://api.github.com/users/uber/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/uber/zero-config","description":"A zero configuration configuration loader","fork":false,"url":"https://api.github.com/repos/uber/zero-config","forks_url":"https://api.github.com/repos/uber/zero-config/forks","keys_url":"https://api.github.com/repos/uber/zero-config/keys{/key_id}","collaborators_url":"https://api.github.com/repos/uber/zero-config/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/uber/zero-config/teams","hooks_url":"https://api.github.com/repos/uber/zero-config/hooks","issue_events_url":"https://api.github.com/repos/uber/zero-config/issues/events{/number}","events_url":"https://api.github.com/repos/uber/zero-config/events","assignees_url":"https://api.github.com/repos/uber/zero-config/assignees{/user}","branches_url":"https://api.github.com/repos/uber/zero-config/branches{/branch}","tags_url":"https://api.github.com/repos/uber/zero-config/tags","blobs_url":"https://api.github.com/repos/uber/zero-config/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/uber/zero-config/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/uber/zero-config/git/refs{/sha}","trees_url":"https://api.github.com/repos/uber/zero-config/git/trees{/sha}","statuses_url":"https://api.github.com/repos/uber/zero-config/statuses/{sha}","languages_url":"https://api.github.com/repos/uber/zero-config/languages","stargazers_url":"https://api.github.com/repos/uber/zero-config/stargazers","contributors_url":"https://api.github.com/repos/uber/zero-config/contributors","subscribers_url":"https://api.github.com/repos/uber/zero-config/subscribers","subscription_url":"https://api.github.com/repos/uber/zero-config/subscription","commits_url":"https://api.github.com/repos/uber/zero-config/commits{/sha}","git_commits_url":"https://api.github.com/repos/uber/zero-config/git/commits{/sha}","comments_url":"https://api.github.com/repos/uber/zero-config/comments{/number}","issue_comment_url":"https://api.github.com/repos/uber/zero-config/issues/comments{/number}","contents_url":"https://api.github.com/repos/uber/zero-config/contents/{+path}","compare_url":"https://api.github.com/repos/uber/zero-config/compare/{base}...{head}","merges_url":"https://api.github.com/repos/uber/zero-config/merges","archive_url":"https://api.github.com/repos/uber/zero-config/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/uber/zero-config/downloads","issues_url":"https://api.github.com/repos/uber/zero-config/issues{/number}","pulls_url":"https://api.github.com/repos/uber/zero-config/pulls{/number}","milestones_url":"https://api.github.com/repos/uber/zero-config/milestones{/number}","notifications_url":"https://api.github.com/repos/uber/zero-config/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/uber/zero-config/labels{/name}","releases_url":"https://api.github.com/repos/uber/zero-config/releases{/id}","created_at":"2014-08-17T05:33:06Z","updated_at":"2015-07-10T18:38:51Z","pushed_at":"2015-07-13T18:53:02Z","git_url":"git://github.com/uber/zero-config.git","ssh_url":"git@github.com:uber/zero-config.git","clone_url":"https://github.com/uber/zero-config.git","svn_url":"https://github.com/uber/zero-config","homepage":null,"size":524,"stargazers_count":47,"watchers_count":47,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":11,"forks":4,"open_issues":11,"watchers":47,"default_branch":"master"}},"base":{"label":"uber:master","ref":"master","sha":"252d15d743fb0069b3c4f3c096bf8213df6a24ce","user":{"login":"uber","id":538264,"avatar_url":"https://avatars.githubusercontent.com/u/538264?v=3","gravatar_id":"","url":"https://api.github.com/users/uber","html_url":"https://github.com/uber","followers_url":"https://api.github.com/users/uber/followers","following_url":"https://api.github.com/users/uber/following{/other_user}","gists_url":"https://api.github.com/users/uber/gists{/gist_id}","starred_url":"https://api.github.com/users/uber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uber/subscriptions","organizations_url":"https://api.github.com/users/uber/orgs","repos_url":"https://api.github.com/users/uber/repos","events_url":"https://api.github.com/users/uber/events{/privacy}","received_events_url":"https://api.github.com/users/uber/received_events","type":"Organization","site_admin":false},"repo":{"id":23033945,"name":"zero-config","full_name":"uber/zero-config","owner":{"login":"uber","id":538264,"avatar_url":"https://avatars.githubusercontent.com/u/538264?v=3","gravatar_id":"","url":"https://api.github.com/users/uber","html_url":"https://github.com/uber","followers_url":"https://api.github.com/users/uber/followers","following_url":"https://api.github.com/users/uber/following{/other_user}","gists_url":"https://api.github.com/users/uber/gists{/gist_id}","starred_url":"https://api.github.com/users/uber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uber/subscriptions","organizations_url":"https://api.github.com/users/uber/orgs","repos_url":"https://api.github.com/users/uber/repos","events_url":"https://api.github.com/users/uber/events{/privacy}","received_events_url":"https://api.github.com/users/uber/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/uber/zero-config","description":"A zero configuration configuration loader","fork":false,"url":"https://api.github.com/repos/uber/zero-config","forks_url":"https://api.github.com/repos/uber/zero-config/forks","keys_url":"https://api.github.com/repos/uber/zero-config/keys{/key_id}","collaborators_url":"https://api.github.com/repos/uber/zero-config/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/uber/zero-config/teams","hooks_url":"https://api.github.com/repos/uber/zero-config/hooks","issue_events_url":"https://api.github.com/repos/uber/zero-config/issues/events{/number}","events_url":"https://api.github.com/repos/uber/zero-config/events","assignees_url":"https://api.github.com/repos/uber/zero-config/assignees{/user}","branches_url":"https://api.github.com/repos/uber/zero-config/branches{/branch}","tags_url":"https://api.github.com/repos/uber/zero-config/tags","blobs_url":"https://api.github.com/repos/uber/zero-config/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/uber/zero-config/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/uber/zero-config/git/refs{/sha}","trees_url":"https://api.github.com/repos/uber/zero-config/git/trees{/sha}","statuses_url":"https://api.github.com/repos/uber/zero-config/statuses/{sha}","languages_url":"https://api.github.com/repos/uber/zero-config/languages","stargazers_url":"https://api.github.com/repos/uber/zero-config/stargazers","contributors_url":"https://api.github.com/repos/uber/zero-config/contributors","subscribers_url":"https://api.github.com/repos/uber/zero-config/subscribers","subscription_url":"https://api.github.com/repos/uber/zero-config/subscription","commits_url":"https://api.github.com/repos/uber/zero-config/commits{/sha}","git_commits_url":"https://api.github.com/repos/uber/zero-config/git/commits{/sha}","comments_url":"https://api.github.com/repos/uber/zero-config/comments{/number}","issue_comment_url":"https://api.github.com/repos/uber/zero-config/issues/comments{/number}","contents_url":"https://api.github.com/repos/uber/zero-config/contents/{+path}","compare_url":"https://api.github.com/repos/uber/zero-config/compare/{base}...{head}","merges_url":"https://api.github.com/repos/uber/zero-config/merges","archive_url":"https://api.github.com/repos/uber/zero-config/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/uber/zero-config/downloads","issues_url":"https://api.github.com/repos/uber/zero-config/issues{/number}","pulls_url":"https://api.github.com/repos/uber/zero-config/pulls{/number}","milestones_url":"https://api.github.com/repos/uber/zero-config/milestones{/number}","notifications_url":"https://api.github.com/repos/uber/zero-config/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/uber/zero-config/labels{/name}","releases_url":"https://api.github.com/repos/uber/zero-config/releases{/id}","created_at":"2014-08-17T05:33:06Z","updated_at":"2015-07-10T18:38:51Z","pushed_at":"2015-07-13T18:53:02Z","git_url":"git://github.com/uber/zero-config.git","ssh_url":"git@github.com:uber/zero-config.git","clone_url":"https://github.com/uber/zero-config.git","svn_url":"https://github.com/uber/zero-config","homepage":null,"size":524,"stargazers_count":47,"watchers_count":47,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":11,"forks":4,"open_issues":11,"watchers":47,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/uber/zero-config/pulls/30"},"html":{"href":"https://github.com/uber/zero-config/pull/30"},"issue":{"href":"https://api.github.com/repos/uber/zero-config/issues/30"},"comments":{"href":"https://api.github.com/repos/uber/zero-config/issues/30/comments"},"review_comments":{"href":"https://api.github.com/repos/uber/zero-config/pulls/30/comments"},"review_comment":{"href":"https://api.github.com/repos/uber/zero-config/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/uber/zero-config/pulls/30/commits"},"statuses":{"href":"https://api.github.com/repos/uber/zero-config/statuses/58ac5bc82d478a5c81ca725de7a5913562e39513"}}}}