{"action":"created","issue":{"url":"https://api.github.com/repos/babel/babel/issues/6341","repository_url":"https://api.github.com/repos/babel/babel","labels_url":"https://api.github.com/repos/babel/babel/issues/6341/labels{/name}","comments_url":"https://api.github.com/repos/babel/babel/issues/6341/comments","events_url":"https://api.github.com/repos/babel/babel/issues/6341/events","html_url":"https://github.com/babel/babel/issues/6341","id":261735107,"node_id":"MDU6SXNzdWUyNjE3MzUxMDc=","number":6341,"title":"object-rest not behaving as expected with computed properties","user":{"login":"lslv1243","id":23214418,"node_id":"MDQ6VXNlcjIzMjE0NDE4","avatar_url":"https://avatars1.githubusercontent.com/u/23214418?v=4","gravatar_id":"","url":"https://api.github.com/users/lslv1243","html_url":"https://github.com/lslv1243","followers_url":"https://api.github.com/users/lslv1243/followers","following_url":"https://api.github.com/users/lslv1243/following{/other_user}","gists_url":"https://api.github.com/users/lslv1243/gists{/gist_id}","starred_url":"https://api.github.com/users/lslv1243/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lslv1243/subscriptions","organizations_url":"https://api.github.com/users/lslv1243/orgs","repos_url":"https://api.github.com/users/lslv1243/repos","events_url":"https://api.github.com/users/lslv1243/events{/privacy}","received_events_url":"https://api.github.com/users/lslv1243/received_events","type":"User","site_admin":false},"labels":[{"id":711597189,"node_id":"MDU6TGFiZWw3MTE1OTcxODk=","url":"https://api.github.com/repos/babel/babel/labels/Spec:%20Object%20Rest/Spread","name":"Spec: Object Rest/Spread","color":"1d76db","default":false},{"id":440210152,"node_id":"MDU6TGFiZWw0NDAyMTAxNTI=","url":"https://api.github.com/repos/babel/babel/labels/i:%20bug","name":"i: bug","color":"e99695","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":10,"created_at":"2017-09-29T19:01:22Z","updated_at":"2018-09-19T13:33:43Z","closed_at":null,"author_association":"NONE","body":"<!---\r\nThanks for filing an issue 😄 ! Before you submit, please read the following:\r\n\r\nSearch open/closed issues before submitting since someone might have asked the same thing before!\r\n\r\nIf you have a support request or question please submit them to one of this resources:\r\n\r\n* Slack Community: https://slack.babeljs.io/\r\n* StackOverflow: http://stackoverflow.com/questions/tagged/babeljs using the tag `babeljs`\r\n* Also have a look at the readme for more information on how to get support:\r\n  https://github.com/babel/babel/blob/master/README.md\r\n\r\nIssues on GitHub are only related to problems of Babel itself and we cannot answer \r\nsupport questions here.\r\n-->\r\n\r\nChoose one: is this a bug report or feature request?\r\nbug\r\n\r\n<!--- Provide a general summary of the issue in the title above -->\r\n\r\n### Input Code\r\n<!--- If you're describing a bug, please let us know which sample code reproduces your problem -->\r\n<!--- If you have link to our REPL or a standalone repo please link that! -->\r\n\r\n```js\r\nconst a = { 1: 0, 2: 1, 3: 2 }\r\nconst i = 1\r\nconst { [i]: val, ...rest } = a\r\n```\r\n\r\n### Babel Configuration (.babelrc, package.json, cli command)\r\n<!--- If describing a bug, tell us what your babel configuration looks like -->\r\n```json\r\n{\r\n  \"presets\": [\"babel-preset-expo\"],\r\n  \"env\": {\r\n    \"development\": {\r\n      \"plugins\": [\"transform-react-jsx-source\"]\r\n    }\r\n  }\r\n}\r\n```\r\n\r\n### Expected Behavior\r\n<!--- If you're describing a bug, tell us what should happen -->\r\n<!--- If you're suggesting a change/improvement, tell us how it should work -->\r\nrest should be \r\n```javascript\r\n{\r\n  \"2\": 1,\r\n  \"3\": 2,\r\n}\r\n```\r\n\r\n### Current Behavior\r\n<!--- If describing a bug, tell us what happens instead of the expected behavior -->\r\n<!--- If suggesting a change/improvement, explain the difference from current behavior -->\r\nrest is \r\n```javascript\r\n{\r\n  \"1\": 0,\r\n  \"2\": 1,\r\n  \"3\": 2,\r\n}\r\n```\r\n\r\n### Possible Solution\r\n<!--- Not obligatory, but suggest a fix/reason for the bug, -->\r\n<!--- or ideas how to implement the addition or change -->\r\nindexOf compares with 3 equals and the object key is represented as string\r\nhttps://github.com/babel/babel/blob/88b7983e4f1b4d472f37c057afce0e86da7feb0b/packages/babel-helpers/src/helpers.js#L469\r\n\r\n### Context\r\n<!--- How has this issue affected you? What are you trying to accomplish? -->\r\n<!--- Providing context helps us come up with a solution that is most useful in the real world -->\r\nrunning react-native application\r\n\r\n### Your Environment\r\n<!--- Include as many relevant details about the environment you experienced the bug in -->\r\nusing react native with expo\r\n```json\r\n{\r\n  \"expo\": {\r\n    \"sdkVersion\": \"21.0.0\"\r\n  }\r\n}\r\n```\r\ndont know about configuration\r\n"},"comment":{"url":"https://api.github.com/repos/babel/babel/issues/comments/422805213","html_url":"https://github.com/babel/babel/issues/6341#issuecomment-422805213","issue_url":"https://api.github.com/repos/babel/babel/issues/6341","id":422805213,"node_id":"MDEyOklzc3VlQ29tbWVudDQyMjgwNTIxMw==","user":{"login":"PJCHENder","id":13399740,"node_id":"MDQ6VXNlcjEzMzk5NzQw","avatar_url":"https://avatars1.githubusercontent.com/u/13399740?v=4","gravatar_id":"","url":"https://api.github.com/users/PJCHENder","html_url":"https://github.com/PJCHENder","followers_url":"https://api.github.com/users/PJCHENder/followers","following_url":"https://api.github.com/users/PJCHENder/following{/other_user}","gists_url":"https://api.github.com/users/PJCHENder/gists{/gist_id}","starred_url":"https://api.github.com/users/PJCHENder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PJCHENder/subscriptions","organizations_url":"https://api.github.com/users/PJCHENder/orgs","repos_url":"https://api.github.com/users/PJCHENder/repos","events_url":"https://api.github.com/users/PJCHENder/events{/privacy}","received_events_url":"https://api.github.com/users/PJCHENder/received_events","type":"User","site_admin":false},"created_at":"2018-09-19T13:33:43Z","updated_at":"2018-09-19T13:33:43Z","author_association":"NONE","body":"Thanks for testing, @Andarist. \r\nI found this issue with the environment settings:  `[\"@babel/core\": \"^7.0.1\", \"@babel/preset-env\"]` which was based on a React project."}}
{"actor":{"display_login":"PJCHENder"}}