summaryrefslogtreecommitdiffstats
path: root/web_src/js/bootstrap.js
diff options
context:
space:
mode:
authorsilverwind <me@silverwind.io>2023-08-31 04:46:44 +0200
committerGitHub <noreply@github.com>2023-08-31 02:46:44 +0000
commitc35b16a9a491ffbd093bf3e759e94cdbc960fe9c (patch)
tree0c642bb55079fe8b3ef6072a10bdbe85c4c50686 /web_src/js/bootstrap.js
parent19a1e1b20ee45f02908c915c8540baab1396899c (diff)
downloadgitea-c35b16a9a491ffbd093bf3e759e94cdbc960fe9c.tar.gz
gitea-c35b16a9a491ffbd093bf3e759e94cdbc960fe9c.zip
Remove joinPaths function (#26833)
Extract from https://github.com/go-gitea/gitea/pull/25940. `assetUrlPrefix` is guaranteed to not contain trailing slashes, making this function unneeded.
Diffstat (limited to 'web_src/js/bootstrap.js')
-rw-r--r--web_src/js/bootstrap.js4
1 files changed, 1 insertions, 3 deletions
diff --git a/web_src/js/bootstrap.js b/web_src/js/bootstrap.js
index 43075ab241..15e5b21204 100644
--- a/web_src/js/bootstrap.js
+++ b/web_src/js/bootstrap.js
@@ -1,11 +1,9 @@
-import {joinPaths} from './utils.js';
-
// DO NOT IMPORT window.config HERE!
// to make sure the error handler always works, we should never import `window.config`, because some user's custom template breaks it.
// This sets up the URL prefix used in webpack's chunk loading.
// This file must be imported before any lazy-loading is being attempted.
-__webpack_public_path__ = joinPaths(window?.config?.assetUrlPrefix ?? '/', '/');
+__webpack_public_path__ = `${window.config?.assetUrlPrefix ?? '/assets'}/`;
export function showGlobalErrorMessage(msg) {
const pageContent = document.querySelector('.page-content');