Issue metadata
Sign in to add a comment
|
Object.keys modifies object values in certain circumstances
Reported by
julian...@gmail.com,
Mar 12 2018
|
||||||||||||||||||||||
Issue description
UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.146 Safari/537.36
Steps to reproduce the problem:
Run this code, perhaps in the dev console:
```
const obj = Object.assign(
{},
{
foo: function bar() {},
},
);
console.log("before:", Object.values(obj));
Object.keys(obj);
console.log("after:", Object.values(obj));
```
What is the expected behavior?
Should print something like:
```
before: [ƒ]
after: [ƒ]
```
What went wrong?
On Chrome Version 65.0.3325.146 (Official Build) (64-bit) (Mac, Windows or Linux) it prints:
```
before: [ƒ]
after: "foo"
```
So something object keys and values appear to get mixed up.
Did this work before? Yes 64
Chrome version: 65.0.3325.146 Channel: stable
OS Version: OS X 10.12.6
Flash Version:
When using Object.entries the same problem occurs, however when logging the object to the console it seems fine.
The problem doesn't happen when using a number or string instead of a function as object value, and only appears to happen when using Object.assign.
,
Mar 12 2018
,
Mar 13 2018
|
|||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||
Comment 1 by woxxom@gmail.com
, Mar 12 2018