FE_BASE_PATH: use trim
instead of trimEnd
This commit is contained in:
parent
39132d7e0e
commit
30848ae080
1 changed files with 2 additions and 2 deletions
|
@ -4,7 +4,7 @@
|
||||||
* @module soapbox/build_config
|
* @module soapbox/build_config
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const { trimEnd } = require('lodash');
|
const { trim } = require('lodash');
|
||||||
|
|
||||||
const {
|
const {
|
||||||
BACKEND_URL,
|
BACKEND_URL,
|
||||||
|
@ -21,7 +21,7 @@ const sanitizeURL = url => {
|
||||||
|
|
||||||
// Run Soapbox FE from a subdirectory.
|
// Run Soapbox FE from a subdirectory.
|
||||||
const getFeBasePath = () => {
|
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
|
// JSON.parse/stringify is to emulate what @preval is doing and avoid any
|
||||||
|
|
Loading…
Reference in a new issue