From d971e7e4ba34387ff14ad3f0eeb29445d4e7bdc1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E4=BC=A0=E9=BE=99?= Date: Tue, 19 Jul 2022 16:29:07 +0800 Subject: [PATCH] fix: fix incorrent judgment of isHash --- src/router/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/router/index.js b/src/router/index.js index 5701bc4..1c0b9d0 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -2,7 +2,7 @@ import { createRouter, createWebHistory, createWebHashHistory } from 'vue-router import { setupRouterGuard } from './guard' import { basicRoutes } from './routes' -const isHash = !!import.meta.env.VITE_APP_USE_HASH +const isHash = import.meta.env.VITE_APP_USE_HASH === 'true' export const router = createRouter({ history: isHash ? createWebHashHistory('/') : createWebHistory('/'), routes: [],