You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Computed property ['__proto__'] not being assigned with defineProperty (T7223) #4188
Issue originally made by Andrew Bradley (cspotcode)
Bug information
Babel version: 6.6.5
Node version: 4.2.1
npm version: 2.14.7
Options
{
"presets": ["es2015"]
}
Input code
require('assert');
var obj = {
['__proto__']: {'assigned with': 'assignment operator', bar: 'baz'},
['foo']: {'assigned with': 'defineProperty'}
};
assert(obj.bar === undefined);
Description
When an object literal sets a computed property "proto", it shouldn't modify the object's prototype. However, Babel is emitting code that does modify the prototype because it's not using defineProperty. This behavior seems to be unique to __proto__ since other computed properties properly use defineProperty.
Activity