From 0a11615e0baddd43f3318db8d0e7d1ef0d04a86c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jarda=20Kot=C4=9B=C5=A1ovec?= Date: Thu, 16 Jan 2025 13:45:14 +0100 Subject: [PATCH] pkp/pkp-lib#7135 Make the aborting multiple previous request reliable in useFetch --- src/composables/useFetch.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/composables/useFetch.js b/src/composables/useFetch.js index 477d877ba..7ed97ea0e 100644 --- a/src/composables/useFetch.js +++ b/src/composables/useFetch.js @@ -25,11 +25,11 @@ export function getCSRFToken() { * - https://github.com/unjs/ufo/issues/185 * - https://github.com/unjs/ufo/issues/208 * - https://github.com/unjs/ofetch/pull/440 - * + * */ function _formatQueryParams(params) { if (!params) { - return {} + return {}; } const formatedParams = {}; @@ -166,7 +166,6 @@ export function useFetch(url, options = {}) { modalStore.openDialogNetworkError(e); } finally { - lastRequestController = null; isLoading.value = false; progressStore.fetchFinished(screenName); if (opts.showFullScreenSpinner) {