UI-Grid : Error "Multiple definitions of a property not allowed in strict mode [object Object]" [ IE- Only ]

Nidhin T T picture Nidhin T T · Feb 19, 2016 · Viewed 15.3k times · Source

While loading Ui-Grid In IE throwing error messages -

[true]  [SYSERR] Multiple definitions of a property not allowed in strict mode [object Object]

enter image description here Issue is only in IE, Not throwing any errors in FireFox & Chrome. Tested on IE Version-11.

Thanks in Advance.

Answer

Lucian picture Lucian · Jun 27, 2016

As the error state, you are using somewhere an object that has more than one property with the same name . Something like :

var obj= {
    property1: 0,
    property2: 1,
    property1: 2
};

Printing the upper object results in :

{ property1: 2, property2: 1 }

Also searching a little bit on stack overflow, you can find a more detailed answer why this error is outputed in Internet Explorer

What's the purpose of allowing duplicate property names?