You need to sign in to do that
Don't have an account?
Srinivasa Somu
Lightning Component > JavaScript Helper/Controller --> Set javaScript Collection is not working from summer'16
Hi,
Set collection (I guess all the Collections) in lightning component's javaScript Helper/Controller is not working from Summer'16, It is throwing the following error -
TypeError: Set is not a Constructor (or)
TypeError: Set is not a Function.
Sample Code:
var s = new Set();
Note:
1. Before Summer'16 upgrade it was working.
2. I have included the above sample code in the javaScript of the Visualforce, It is working. Only the Lightning Component is causing the issue.
Please help me with a work around or let me know if you have any suggestions.
Thanks,
Srinivas
Set collection (I guess all the Collections) in lightning component's javaScript Helper/Controller is not working from Summer'16, It is throwing the following error -
TypeError: Set is not a Constructor (or)
TypeError: Set is not a Function.
Sample Code:
var s = new Set();
Note:
1. Before Summer'16 upgrade it was working.
2. I have included the above sample code in the javaScript of the Visualforce, It is working. Only the Lightning Component is causing the issue.
Please help me with a work around or let me know if you have any suggestions.
Thanks,
Srinivas
We have submitted a case with Salesforce. They suggested to to turn off Enable Lightning LockerService Security in Critical Updates.
Problem is resolved.
Thanks,
Srinivas
All Answers
Yes, it not supporting me as well. We can use var s = new Array(); or var s = [];
Thanks,
Amit
Thanks for the reply.
We don't want to allow duplicates, we need to verify wether a value present in set or not, out of thousands of entries in collection.
We have to loop through and verify for each and every value we are going to add if we use array.
Looking for working around alternative to the Set.
Thanks,
Srinivas
We have submitted a case with Salesforce. They suggested to to turn off Enable Lightning LockerService Security in Critical Updates.
Problem is resolved.
Thanks,
Srinivas
Nice to know about this.