FE_BASE_PATH: use `trim` instead of `trimEnd`

build-json
Alex Gleason 2021-09-02 17:18:53 -05:00
rodzic 39132d7e0e
commit 30848ae080
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 7211D1F99744FBB7
1 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -4,7 +4,7 @@
* @module soapbox/build_config
*/
const { trimEnd } = require('lodash');
const { trim } = require('lodash');
const {
BACKEND_URL,
@ -21,7 +21,7 @@ const sanitizeURL = url => {
// Run Soapbox FE from a subdirectory.
const getFeBasePath = () => {
return trimEnd(FE_BASE_PATH, '/') || '/';
return `/${trim(FE_BASE_PATH, '/')}`;
};
// JSON.parse/stringify is to emulate what @preval is doing and avoid any