Skip to content

Commit 88db937

Browse files
authored
Merge pull request #645 from MoYingJi/fix
fix(cache): 修复缓存大小上限默认值处理
2 parents ccfc7ad + 2a5e58e commit 88db937

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

electron/main/services/MusicCacheService.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ export class MusicCacheService {
7575
*/
7676
public async cacheMusic(id: number | string, url: string, quality: string): Promise<string> {
7777
const store = useStore();
78-
const limitSizeGB = store.get("cacheLimit") || 10;
78+
const limitSizeGB = store.get("cacheLimit") ?? 10;
7979
const limitSizeBytes = limitSizeGB * 1024 * 1024 * 1024;
8080

8181
// 如果设置为 0,则不限制

0 commit comments

Comments
 (0)