diff --git a/backend/cmd/main.go b/backend/cmd/main.go index 7ad373c..3c9b01b 100644 --- a/backend/cmd/main.go +++ b/backend/cmd/main.go @@ -264,6 +264,7 @@ func setupEmbeddedFrontend(r *gin.Engine) { r.GET("/assets/*filepath", func(c *gin.Context) { filepath := c.Param("filepath") + filepath = strings.TrimPrefix(filepath, "/") decodedPath, err := url.PathUnescape(filepath) if err != nil { decodedPath = filepath diff --git a/frontend/src/router/index.ts b/frontend/src/router/index.ts index fa2796c..2602ef7 100644 --- a/frontend/src/router/index.ts +++ b/frontend/src/router/index.ts @@ -13,12 +13,6 @@ const router = createRouter({ }, }) -router.onError((error) => { - if (error.message.includes('Failed to fetch dynamically imported module')) { - window.location.reload() - } -}) - createRouterGuard(router) export default router