{"action":"created","issue":{"url":"https://api.github.com/repos/lodash/lodash/issues/1794","labels_url":"https://api.github.com/repos/lodash/lodash/issues/1794/labels{/name}","comments_url":"https://api.github.com/repos/lodash/lodash/issues/1794/comments","events_url":"https://api.github.com/repos/lodash/lodash/issues/1794/events","html_url":"https://github.com/lodash/lodash/issues/1794","id":126677172,"number":1794,"title":"`_.merge`: unexpected behavior when merging nested functions and objects","user":{"login":"timkendrick","id":953720,"avatar_url":"https://avatars.githubusercontent.com/u/953720?v=3","gravatar_id":"","url":"https://api.github.com/users/timkendrick","html_url":"https://github.com/timkendrick","followers_url":"https://api.github.com/users/timkendrick/followers","following_url":"https://api.github.com/users/timkendrick/following{/other_user}","gists_url":"https://api.github.com/users/timkendrick/gists{/gist_id}","starred_url":"https://api.github.com/users/timkendrick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timkendrick/subscriptions","organizations_url":"https://api.github.com/users/timkendrick/orgs","repos_url":"https://api.github.com/users/timkendrick/repos","events_url":"https://api.github.com/users/timkendrick/events{/privacy}","received_events_url":"https://api.github.com/users/timkendrick/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/lodash/lodash/labels/question","name":"question","color":"d4c5f9"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-01-14T15:25:17Z","updated_at":"2016-01-14T17:19:41Z","closed_at":null,"body":"I recently upgraded to v4 of lodash.merge, and some of the behavior seems to have changed:\r\n\r\n```javascript\r\nvar merge = require('lodash.merge');\r\n\r\nvar fn = function fn() {};\r\nvar obj = { obj: true };\r\n\r\nvar result = merge({}, { prop: fn }, { prop: obj });\r\n\r\nconsole.log(result);\r\n```\r\n\r\nin v3, this outputs: `{ prop: { obj: true } }`\r\nin v4, this outputs: `{ prop: { [Function: fn] obj: true } }` (i.e. the original `fn` function, which now has an added `obj` key)\r\n\r\nTo me, the v4 result is surprising: I would expect it just to replace `fn` with `obj` in the output, but instead it attempts to merge the function and the object together. It appears to do this by defining an extra property on the `fn` function itself, and returning the function. Is this the intended behavior?"},"comment":{"url":"https://api.github.com/repos/lodash/lodash/issues/comments/171711778","html_url":"https://github.com/lodash/lodash/issues/1794#issuecomment-171711778","issue_url":"https://api.github.com/repos/lodash/lodash/issues/1794","id":171711778,"user":{"login":"Willever1984","id":16505149,"avatar_url":"https://avatars.githubusercontent.com/u/16505149?v=3","gravatar_id":"","url":"https://api.github.com/users/Willever1984","html_url":"https://github.com/Willever1984","followers_url":"https://api.github.com/users/Willever1984/followers","following_url":"https://api.github.com/users/Willever1984/following{/other_user}","gists_url":"https://api.github.com/users/Willever1984/gists{/gist_id}","starred_url":"https://api.github.com/users/Willever1984/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Willever1984/subscriptions","organizations_url":"https://api.github.com/users/Willever1984/orgs","repos_url":"https://api.github.com/users/Willever1984/repos","events_url":"https://api.github.com/users/Willever1984/events{/privacy}","received_events_url":"https://api.github.com/users/Willever1984/received_events","type":"User","site_admin":false},"created_at":"2016-01-14T17:19:41Z","updated_at":"2016-01-14T17:19:41Z","body":"J"}}