M
M
mix-92020-02-04 21:15:31
JavaScript
mix-9, 2020-02-04 21:15:31

How to resolve the conflict between Yandex maps and the Map data structure?

Good afternoon. Faced such a problem
https://monosnap.com/direct/BUqfdvVcn7jZ6CTB6yMtf0...
The site is on Bitrix, but the error does not apply to them. They, as I understand it, use the standard Map structure
https://developer.mozilla.org/en-US/docs/Web/JavaS...
something like this


const globalListeners = (globalEvents && globalEvents.eventsMap.get(fullEventName)) || newmap();
targetListeners = (targetEvents && targetEvents.eventsMap.get(fullEventName)) || newmap();
const listeners = [...globalListeners.values(), ...targetListeners.values()];

on these new Map the script also falls, tk. there is a Map from Yandex maps, in which there is no constructor, only language phrases are stored.
Actually the question is what to do?

PS: I figured it out, I thought the data comes from Yandex, but no

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Shamanov, 2020-02-05
@mix-9

wrap them in a function to change the namespace

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question