diff --git a/lib/util/cache/repository/impl/base.ts b/lib/util/cache/repository/impl/base.ts index 2fbb6ef8964a7f..4f3383e137ac7b 100644 --- a/lib/util/cache/repository/impl/base.ts +++ b/lib/util/cache/repository/impl/base.ts @@ -71,8 +71,9 @@ export abstract class RepoCacheBase implements RepoCache { } async save(): Promise { - cleanupHttpCache(this.data); - + if (this.data) { + cleanupHttpCache(this.data); + } const jsonStr = safeStringify(this.data); const hashedJsonStr = hash(jsonStr); if (hashedJsonStr === this.oldHash) {