diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/asset-url.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/asset-url.js b/src/asset-url.js index bd80240..89ad1ea 100644 --- a/src/asset-url.js +++ b/src/asset-url.js @@ -1,6 +1,8 @@ // The standalone wallet (standalone.html opened from a disk) has no files // beside it: punks, the lazy modules and the language packs come from the -// site instead. Served from anywhere else, paths stay relative. +// site instead. Served from anywhere else, paths are from the site root: +// relative ones resolved against a deep page (/feed/…, /nevent1…, /chat) +// and fetched the app's HTML instead (the coinos community's logo broke). export const SITE = 'https://v3.coinos.io/'; const fromDisk = () => typeof location !== 'undefined' && location.protocol === 'file:'; -export const assetUrl = (path) => fromDisk() ? SITE + path.replace(/^\//, '') : path; +export const assetUrl = (path) => (fromDisk() ? SITE : '/') + path.replace(/^\//, ''); |
