mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05: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:
parent
8111ff2865
commit
6d31ff6400
1 changed files with 1 additions and 1 deletions
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue