From c35b16a9a491ffbd093bf3e759e94cdbc960fe9c Mon Sep 17 00:00:00 2001 From: silverwind Date: Thu, 31 Aug 2023 04:46:44 +0200 Subject: 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. --- web_src/js/bootstrap.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'web_src/js/bootstrap.js') 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'); -- cgit v1.2.3