{"action":"created","issue":{"url":"https://api.github.com/repos/lodash/lodash/issues/931","labels_url":"https://api.github.com/repos/lodash/lodash/issues/931/labels{/name}","comments_url":"https://api.github.com/repos/lodash/lodash/issues/931/comments","events_url":"https://api.github.com/repos/lodash/lodash/issues/931/events","html_url":"https://github.com/lodash/lodash/issues/931","id":56612045,"number":931,"title":"Calling `push` on wrapped array returns unexpected results.","user":{"login":"evanrs","id":297455,"avatar_url":"https://avatars.githubusercontent.com/u/297455?v=3","gravatar_id":"","url":"https://api.github.com/users/evanrs","html_url":"https://github.com/evanrs","followers_url":"https://api.github.com/users/evanrs/followers","following_url":"https://api.github.com/users/evanrs/following{/other_user}","gists_url":"https://api.github.com/users/evanrs/gists{/gist_id}","starred_url":"https://api.github.com/users/evanrs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evanrs/subscriptions","organizations_url":"https://api.github.com/users/evanrs/orgs","repos_url":"https://api.github.com/users/evanrs/repos","events_url":"https://api.github.com/users/evanrs/events{/privacy}","received_events_url":"https://api.github.com/users/evanrs/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/lodash/lodash/labels/question","name":"question","color":"d4c5f9"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-02-05T00:55:50Z","updated_at":"2015-02-05T01:25:57Z","closed_at":"2015-02-05T01:00:27Z","body":"While migrating to 3.1.0 I encountered some unexpected results, specifically:\r\n```javascript\r\nvar wrap = _([])\r\nwrap.push(1).push(2)\r\nwrap.value()\r\n// => []\r\n```\r\nI expected push to mimic an arrays native push function, updating the existing array. But we'll just reassign `wrap` and move on\r\n```javascript\r\nvar wrap = _([])\r\nwrap = wrap.push(1).push(2)\r\nwrap.value()\r\n// => [1, 2]\r\n```\r\nEverything seems fine now, until performing an operation on the reassigned wrapped array.\r\n```javascript\r\nvar wrap = _([])\r\nwrap = wrap.push(1).push(2)\r\nwrap.find({})\r\nwrap.value()\r\n// => [1, 2, 1, 2]\r\n```\r\n```javascript\r\nvar wrap = _([])\r\nwrap = wrap.push(1).push(2)\r\nwrap.find({})\r\nwrap.find({})\r\nwrap.value()\r\n// => [1, 2, 1, 2, 1, 2]\r\n```\r\nI'm not yet familiar with how 3.x.x works to tackle this one, but I'm looking forward to the PR that addresses it.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/lodash/lodash/issues/comments/72977420","html_url":"https://github.com/lodash/lodash/issues/931#issuecomment-72977420","issue_url":"https://api.github.com/repos/lodash/lodash/issues/931","id":72977420,"user":{"login":"jdalton","id":4303,"avatar_url":"https://avatars.githubusercontent.com/u/4303?v=3","gravatar_id":"","url":"https://api.github.com/users/jdalton","html_url":"https://github.com/jdalton","followers_url":"https://api.github.com/users/jdalton/followers","following_url":"https://api.github.com/users/jdalton/following{/other_user}","gists_url":"https://api.github.com/users/jdalton/gists{/gist_id}","starred_url":"https://api.github.com/users/jdalton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdalton/subscriptions","organizations_url":"https://api.github.com/users/jdalton/orgs","repos_url":"https://api.github.com/users/jdalton/repos","events_url":"https://api.github.com/users/jdalton/events{/privacy}","received_events_url":"https://api.github.com/users/jdalton/received_events","type":"User","site_admin":false},"created_at":"2015-02-05T01:25:57Z","updated_at":"2015-02-05T01:25:57Z","body":"Thoughts? Opinions on naming?"}}