Commit b089c604 authored by Anton's avatar Anton

Prevent recursive loop by not fetching existing maps

parent 08e13955
Pipeline #14176 passed with stage
in 29 seconds
...@@ -112,7 +112,10 @@ const fetchMap = async function (uuid, results, requestConfig) { ...@@ -112,7 +112,10 @@ const fetchMap = async function (uuid, results, requestConfig) {
} }
for (let linkedUuid of linkedGrids) { for (let linkedUuid of linkedGrids) {
results = await fetchMap(linkedUuid, results, requestConfig) const existing = results.maps.find(map => map.uuid === linkedUuid)
if (!existing) {
results = await fetchMap(linkedUuid, results, requestConfig)
}
} }
return results return results
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment