mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-24 09:39:35 +02:00
Merge pull request #14967 from overleaf/jpa-fetch-mock-last-url
[web] less verbose access to last fetch-mock URL GitOrigin-RevId: 7266fdd62eab29b944675c865c6c5f547d207abc
This commit is contained in:
@@ -618,7 +618,7 @@ function createMessages(number, user, timestamp = Date.now()) {
|
||||
* Get query param by key from the last fetchMock response
|
||||
*/
|
||||
function getLastFetchMockQueryParam(key) {
|
||||
const { url } = fetchMock.lastResponse()
|
||||
const url = fetchMock.lastUrl()
|
||||
const { searchParams } = new URL(url, 'https://www.overleaf.com')
|
||||
return searchParams.get(key)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user