Skip to content

Commit

Permalink
fix: unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
fangzhengjin committed Nov 1, 2024
1 parent 760c862 commit c54a9e4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/core/service/ProxyCacheService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ export class ProxyCacheService extends AbstractService {
}

// replace tarball url
const { status, data: { manifest } } = responseResult;
const { status, data: manifest } = responseResult;
// sourceRegistry not found, check private package
if (status === 404) {
const { etag, data: manifest, blockReason } = fileType === DIST_NAMES.FULL_MANIFESTS ?
Expand All @@ -200,7 +200,7 @@ export class ProxyCacheService extends AbstractService {
const hasPrivatePackage = etag && !blockReason;

// pkg manifest
const versionMap = manifest?.versions || {};
const versionMap = manifest.versions || {};
for (const key in versionMap) {
const versionItem = versionMap[key];
if (versionItem?.dist?.tarball) {
Expand All @@ -215,7 +215,7 @@ export class ProxyCacheService extends AbstractService {
versionMap[key] = privateVersionMap[key];
}
}
if (manifest?.time) {
if (manifest.time) {
const privateTimeMap = data?.time || {};
for (const key in privateTimeMap) {
if (!manifest.time[key]) {
Expand Down

0 comments on commit c54a9e4

Please sign in to comment.