I am using
enqueueLinks
to pass some URLs to another handler. This works fine when I do:
await enqueueLinks({
label: "LIST_PLACES",
urls: searchSquareLinks,
strategy: "same-domain",
userData,
})
but as soon as I add a
transformRequestFunction
the label is overridden and it queues the links back to the handler from which is is being queued:
await enqueueLinks({
label: "LIST_PLACES",
urls: searchSquareLinks,
transformRequestFunction: (request) => {
request.userData = {
...userData,
zoomTarget: request.url.match(zoomRegex)?.[1],
}
return request
},
strategy: "same-domain",
userData,
})
Why is the
label
being overridden when the only property of
request
being changed is the
zoomTarget
?