Opened 6 years ago

Closed 6 years ago

#4961 closed defect (fixed)

Random map object "Map" should not overwrite the existing "Map" keyword

Reported by: elexis Owned by: elexis
Priority: Should Have Milestone: Alpha 23
Component: Maps Keywords:
Cc: Patch:

Description

In JS, a "Map" is an object like an Array, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map

But the random map generation JS library introduces an own "Map" prototype that holds all the essential information passed to C++.

It should be renamed to avoid not only the direct naming conflict, but also the order-of-execution issue (if some code would want to register a Map prototype before the file defining that prototype was loaded. The files are loaded in alphabetic order.).

Change History (2)

comment:1 by elexis, 6 years ago

Milestone: BacklogAlpha 23
Owner: set to elexis

comment:2 by elexis, 6 years ago

Resolution: fixed
Status: newclosed

In 20898:

Rename random map Map to RandomMap, so that it doesn't overwrite the native JS Map object, fixes #4961.

Note: See TracTickets for help on using tickets.