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

2

7

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.

Edna answered 19/2, 2016 at 5:31 Comment(1)
why does this only happen on internet explorer?Blackmore
E
10

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?

Enclasp answered 27/6, 2016 at 7:41 Comment(0)
Q
7

Its difficult to find multiple definition manually when you have long code written by someone else.

I used http://jshint.com/ and pasted code there, it showed me all duplicate warnings and I fixed those everything worked.

Quadrillion answered 10/2, 2017 at 9:8 Comment(3)
Link-only answers are highly discouraged here because the links may become dead in the future. I suggest you edit your answer with quotes from the sources you cite.Fenny
@AnirudhSharma I understand links may become dead my answer is just a suggestion how i solved this problem when i faced it, may help someone else they can use some other tools also just giving them a idea here.Quadrillion
Thanks your hint saved me - was having great trouble finding that double definition. Definitely was worth posting it here!Fortier

© 2022 - 2024 — McMap. All rights reserved.