You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Loading jsvectormap in an Angular component does not work. The proper way to get a reference to the container element is to use the @ViewChild annotation and then load the map on ngAfterViewInit. Doing so causes a stack overflow (InternalError: too much recursion).
ERROR InternalError: too much recursion
toString zone.js:1571
t jsvectormap.min.js:1
t jsvectormap.min.js:1
r jsvectormap.min.js:1
o jsvectormap.min.js:1
i jsvectormap.min.js:1
s jsvectormap.min.js:1
s jsvectormap.min.js:1
o jsvectormap.min.js:1
i jsvectormap.min.js:1
r jsvectormap.min.js:1
r jsvectormap.min.js:1
o jsvectormap.min.js:1
i jsvectormap.min.js:1
s jsvectormap.min.js:1
s jsvectormap.min.js:1
o jsvectormap.min.js:1
i jsvectormap.min.js:1
r jsvectormap.min.js:1
...
Error in Chrome:
core.mjs:6461 ERROR RangeError: Maximum call stack size exceeded
at TView.Object.toString (polyfills.js:5945:42)
at vendor.js:938:1000
at Object.t [as isMergeableObject] (vendor.js:938:1096)
at i (vendor.js:938:1217)
at vendor.js:938:1343
at Array.map (<anonymous>)
at Object.s [as arrayMerge] (vendor.js:938:1319)
at o (vendor.js:938:2199)
at i (vendor.js:938:1238)
at vendor.js:938:1992
The error happens when merging the map's options. Specifically when iterating over the properties of the selector property which is, in this case, a HTMLDivElement. I suspect that the infinite recursion is due to the hierarchical nature of the DOM element (the DOM element holds a reference to it's parent and children which, in turn, hold a reference to their parent and children).
A solution would be to not merge the properties of DOM elements.
The text was updated successfully, but these errors were encountered:
smoelker
added a commit
to smoelker/jsvectormap
that referenced
this issue
Mar 22, 2022
Loading jsvectormap in an Angular component does not work. The proper way to get a reference to the container element is to use the
@ViewChild
annotation and then load the map onngAfterViewInit
. Doing so causes a stack overflow (InternalError: too much recursion
).Steps to reproduce:
package.json
app.component.html
app.component.ts
Error in FireFox:
Error in Chrome:
The error happens when merging the map's options. Specifically when iterating over the properties of the
selector
property which is, in this case, a HTMLDivElement. I suspect that the infinite recursion is due to the hierarchical nature of the DOM element (the DOM element holds a reference to it's parent and children which, in turn, hold a reference to their parent and children).A solution would be to not merge the properties of DOM elements.
The text was updated successfully, but these errors were encountered: