mirror of
https://github.com/Pandipipas/scoreko-dev.git
synced 2026-06-06 03:32:06 +00:00
fix: relax bundle config requirements and default assetsBaseUrl
This commit is contained in:
@@ -72,12 +72,12 @@ const requestHeaders = {
|
||||
const getConfiguredAssetsBaseUrl = () => {
|
||||
const configuredValue = nodecg.bundleConfig.assetsBaseUrl;
|
||||
if (typeof configuredValue !== 'string') {
|
||||
throw new Error('La configuración assetsBaseUrl es obligatoria y debe ser un string.');
|
||||
return 'http://localhost';
|
||||
}
|
||||
|
||||
const trimmed = configuredValue.trim();
|
||||
if (!trimmed) {
|
||||
throw new Error('La configuración assetsBaseUrl es obligatoria para descargar assets por HTTP.');
|
||||
return 'http://localhost';
|
||||
}
|
||||
|
||||
return trimmed.replace(/\/+$/, '');
|
||||
|
||||
Reference in New Issue
Block a user