From be2e61b516d9d997d12bd168054cfb91c4621fc5 Mon Sep 17 00:00:00 2001 From: "luk.lu" Date: Mon, 16 Jan 2023 15:25:02 +0800 Subject: [PATCH] u --- unitool.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/unitool.js b/unitool.js index 0553507..f4826fa 100644 --- a/unitool.js +++ b/unitool.js @@ -151,8 +151,8 @@ export default { return route } - const hostname = envar.servHostname || globalThis.window?.location?.hostname || 'localhost' - const port = envar.servPort || globalThis.window?.location?.port || '' + const hostname = envar.servHostname || 'localhost' + const port = envar.servPort || '' const protocol = hostname === 'localhost' ? 'http' : envar.servProtocol || (process.env.NODE_ENV === 'production' ? 'https' : 'http') return `${protocol}://${hostname}${port ? ':' : ''}${port}/${route.replace(/^\//, '')}`