Closed Xotic750 closed 7 years ago
http://www.ecma-international.org/ecma-262/6.0/#sec-topropertykey
Let key be ToPrimitive(argument, hint String). ReturnIfAbrupt(key). If Type(key) is Symbol, then a. Return key. Return ToString(key).
https://github.com/ljharb/es-abstract/blob/master/es2015.js#L150
But instead of return key, it is being converted to a string.
key
ToPropertyKey: function ToPropertyKey(argument) { var key = this.ToPrimitive(argument, String); return typeof key === 'symbol' ? symbolToStr.call(key) : this.ToString(key); },
Whoops, good call.
http://www.ecma-international.org/ecma-262/6.0/#sec-topropertykey
https://github.com/ljharb/es-abstract/blob/master/es2015.js#L150
But instead of return
key
, it is being converted to a string.