1
0
mirror of https://github.com/SomboChea/ui synced 2026-01-18 00:56:00 +07:00

fix: generate correct registry URL (#413)

* Revert "Revert "fix(#300): correctly reference registry url from options" (#311)"

This reverts commit d955268c25.

* fix: generate full URL from path
This commit is contained in:
Daniel Ruf
2020-01-09 06:12:50 +01:00
committed by Juan Picado @jotadeveloper
parent 3fd0154da3
commit 6b322ad553
5 changed files with 12 additions and 10 deletions

View File

@@ -15,8 +15,7 @@ export function isEmail(email: string): boolean {
}
export function getRegistryURL(): string {
// Don't add slash if it's not a sub directory
return `${location.origin}${location.pathname === '/' ? '' : location.pathname}`;
return window.__VERDACCIO_BASENAME_UI_OPTIONS.base;
}
export function extractFileName(url: string): string {