Просмотр исходного кода

Really fix __webpack_public_path__ for 1.11 (#11961)

Trailing slash is actually significant, fixed that and i've now tested
it as well.

Ref: https://github.com/go-gitea/gitea/issues/11839#issuecomment-646203505
tags/v1.11.8
silverwind 3 лет назад
Родитель
Сommit
ce51c2bdf6
Аккаунт пользователя с таким Email не найден
1 измененных файлов: 1 добавлений и 1 удалений
  1. 1
    1
      web_src/js/publicPath.js

+ 1
- 1
web_src/js/publicPath.js Просмотреть файл

@@ -3,7 +3,7 @@
const { StaticUrlPrefix } = window.config;

if (StaticUrlPrefix) {
__webpack_public_path__ = `${StaticUrlPrefix.endsWith('/') ? StaticUrlPrefix : `${StaticUrlPrefix}/`}js`;
__webpack_public_path__ = `${StaticUrlPrefix.endsWith('/') ? StaticUrlPrefix : `${StaticUrlPrefix}/`}js/`;
} else if (document.currentScript && document.currentScript.src) {
const url = new URL(document.currentScript.src);
__webpack_public_path__ = `${url.pathname.replace(/\/[^/]*$/, '')}/`;

Загрузка…
Отмена
Сохранить