small nit BASE_URL

This commit is contained in:
Ruben Fiszel
2024-07-22 19:47:01 +02:00
parent 0452abb05d
commit 00541e8218
+2 -3
View File
@@ -1,9 +1,8 @@
import { goto as svelteGoto } from '$app/navigation'
export { base } from '$lib/base'
import { base } from '$lib/base'
import { base } from '$app/paths'
export function goto(path, options = {}) {
if (base == '/') {
if (base == '') {
return svelteGoto(path, options)
} else {
const fullPath = path.startsWith(base) ? path : `${base}${path}`