From a8e2f6fafcf106ccc0d5a46972e66c2bf73155e3 Mon Sep 17 00:00:00 2001 From: imfenghuang Date: Fri, 21 Jun 2024 22:00:30 +0800 Subject: [PATCH] fix(client): uniform variable `location` (#17528) --- packages/vite/src/client/client.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/vite/src/client/client.ts b/packages/vite/src/client/client.ts index 703fc3f7302f29..ef4d6ad78b9e50 100644 --- a/packages/vite/src/client/client.ts +++ b/packages/vite/src/client/client.ts @@ -190,7 +190,7 @@ async function handleMessage(payload: HMRPayload) { // module script failed to load (since one of the nested imports is 500). // in this case a normal update won't work and a full reload is needed. if (isFirstUpdate && hasErrorOverlay()) { - window.location.reload() + location.reload() return } else { if (enableOverlay) {