diff --git a/backend/package.json b/backend/package.json index 254d86f9..20503560 100644 --- a/backend/package.json +++ b/backend/package.json @@ -1,6 +1,6 @@ { "name": "sub-store", - "version": "2.36.25", + "version": "2.36.26", "description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and Shadowrocket.", "main": "src/main.js", "packageManager": "pnpm@11.0.9", diff --git a/backend/src/restful/index.js b/backend/src/restful/index.js index 6cc60726..39748b81 100644 --- a/backend/src/restful/index.js +++ b/backend/src/restful/index.js @@ -52,9 +52,9 @@ export default function serve() { ? createFrontendStaticMiddleware(fe_path, '/index.html') : null; if (be_prefix || be_merge) { - if (!fe_be_path.startsWith('/')) { + if (!fe_be_path?.startsWith('/')) { throw new Error( - 'SUB_STORE_FRONTEND_BACKEND_PATH should start with /', + 'SUB_STORE_FRONTEND_BACKEND_PATH must be set and start with "/" when SUB_STORE_BACKEND_PREFIX or SUB_STORE_BACKEND_MERGE is enabled', ); } if (be_merge) { @@ -371,7 +371,7 @@ export default function serve() { if (fe_be_path) { if (!fe_be_path.startsWith('/')) { throw new Error( - 'SUB_STORE_FRONTEND_BACKEND_PATH should start with /', + 'SUB_STORE_FRONTEND_BACKEND_PATH must start with "/"', ); } be_api_rewrite = `${