Invalid descriptor for property '0'
See original GitHub issueIn IE 11, I’m getting the error:
Invalid descriptor for property ‘0’
Walking up the call stack, it’s stemming from some code that is constructing a DOMTokenList
with a body element and 'className'
:
e=new DOMTokenList(body, 'className');
…which eventually hits this code which throws the error:
_(y,n,r)
_
is some function nameddefineProperty
y
is some objectn
is0
r
is set toundefined
I’m using this polyfill URL (linebreaks added for readability):
https://cdn.polyfill.io/v2/polyfill.min.js
?unknown=polyfill
&features=
default%2C
fetch%2C
Array.prototype.%40%40iterator%2C
Array.prototype.find%2C
Array.prototype.findIndex%2C
Function.name%2C
Number.isFinite%2C
Promise%2C
String.prototype.repeat%2C
Array.prototype.includes%2C
Intl.~locale.en-US%2C
Promise.prototype.finally
Issue Analytics
- State:
- Created 5 years ago
- Reactions:10
- Comments:21 (3 by maintainers)
Top Results From Across the Web
When using a custom decorator on a get accessor, why do I ...
You have set a get method and value in the descriptor, but this is invalid (you can have accessors or value, not both)....
Read more >Object.defineProperty() - JavaScript - MDN Web Docs
This method allows a precise addition to or modification of a property on an object. Normal property addition through assignment creates ...
Read more >Boost Graph Library: Adjacency List - 1.55.0
The property maps obtained from the adjacency_list class are models of the Lvalue ... Note that in this discussion iterator and descriptor invalidation...
Read more >descriptor.h | Protocol Buffers - Google Developers
Gets a field by index, where 0 <= index < field_count(). more. ... The underlay remains property of the caller; it must remain...
Read more >Descriptor for Applications, Components, and ... - SAPUI5 SDK
The data of the app descriptor is stored in JSON format in the manifest.json file. ... The ui5:// URLs have the following properties:....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
With this code is possible to simulate on IE11 or also Chrome 37 (Before Symbol support) since it is easier to debug on Chrome:
At some point the key
Symbol.toStringTag
in the Object.prototype is being deleted. I am having this issue using Webpack + ReactUniversalComponent in dev mode.Here’s the unminified stacktrace:
That
setDescriptor
function is from theSymbol
polyfill:If I try the same call in Firefox (
Object.defineProperty(Object.prototype, '0', undefined)
) I get the errorTypeError: descriptor must be an object, got undefined
, so this probably isn’t exclusively an IE11 bug, it probably occurs in IE11 because IE is the only major browser that gets the DOMTokenList polyfill.