mirror of
https://github.com/Frooodle/Stirling-PDF.git
synced 2026-02-17 13:52:14 +01:00
empty path fix
This commit is contained in:
parent
40fd5bb808
commit
ea78f78760
@ -7,7 +7,8 @@ export const getBaseUrl = (): string => {
|
||||
};
|
||||
|
||||
// Base path from Vite config - build-time constant, normalized (no trailing slash)
|
||||
export const BASE_PATH = (import.meta.env.BASE_URL || '/').replace(/\/$/, '');
|
||||
// When no subpath, use empty string instead of '.' to avoid relative path issues
|
||||
export const BASE_PATH = (import.meta.env.BASE_URL || '/').replace(/\/$/, '').replace(/^\.$/, '');
|
||||
|
||||
/** For in-app navigations when you must touch window.location (rare). */
|
||||
export const withBasePath = (path: string): string => {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user