d3.js in Lightning Component – TypeError: cannot use the given object as a weak map key throws in Firefox

this error appears in Firefox (56.0) when trying to run (d3.js v4):

 svg = svg.call(d3.zoom().on("zoom", zoomed)).append("g"); 
or 
.call(d3.drag()...

in Lightning component.

error:
TypeError: cannot use the given object as a weak map key throws at https://c.cs83.visual.force.com/auraFW/javascript/adfsdfghjjJGH/aura_prod.js:749:168

I found posts about the same issue in very old versions of Firefox.
Also it works in Chrome

Answer

Attribution
Source : Link , Question Author : Karel L , Answer Author : Community

Leave a Comment