feat: 使用自定义缓存时 cacheKey 的值不能为空

This commit is contained in:
xream 2024-09-13 23:42:55 +08:00
parent c9158ceb1d
commit de2813b035
No known key found for this signature in database
GPG Key ID: 1D2C5225471789F9
2 changed files with 6 additions and 1 deletions

View File

@ -1,6 +1,6 @@
{
"name": "sub-store",
"version": "2.14.381",
"version": "2.14.382",
"description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and ShadowRocket.",
"main": "src/main.js",
"scripts": {

View File

@ -49,6 +49,11 @@ export default async function download(
const requestTimeout = timeout || defaultTimeout;
const id = hex_md5(userAgent + url);
if ($arguments?.cacheKey === true) {
$.error(`使用自定义缓存时 cacheKey 的值不能为空`);
$arguments.cacheKey = undefined;
}
const customCacheKey = $arguments?.cacheKey
? `#sub-store-cached-custom-${$arguments?.cacheKey}`
: undefined;