Skip to content

Commit

Permalink
[v3.8.5] Don't use private property '_files' in cache-manager.js. (#1…
Browse files Browse the repository at this point in the history
  • Loading branch information
dumganhar authored Nov 13, 2024
1 parent de3f0c5 commit 7e88235
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
7 changes: 7 additions & 0 deletions cocos/asset/asset-manager/asset-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,13 @@ export class AssetManager {

private constructor () {}

/**
* @engineInternal
*/
public get files(): Cache {

Check warning on line 337 in cocos/asset/asset-manager/asset-manager.ts

View workflow job for this annotation

GitHub Actions / Run ESLint

Missing space before function parentheses
return this._files$;
}

/**
* @engineInternal
*/
Expand Down
2 changes: 1 addition & 1 deletion platforms/minigame/common/engine/cache-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ const cacheManager = {
}
for (let i = 0, l = caches.length; i < l; i++) {
const cacheKey = `${cc.assetManager.utils.getUuidFromURL(caches[i].originUrl)}@native`;
cc.assetManager._files.remove(cacheKey);
cc.assetManager.files.remove(cacheKey);
this.cachedFiles.remove(caches[i].originUrl);
}

Expand Down
2 changes: 1 addition & 1 deletion platforms/runtime/common/engine/cache-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ const cacheManager = {
}
for (let i = 0, l = caches.length; i < l; i++) {
const cacheKey = `${cc.assetManager.utils.getUuidFromURL(caches[i].originUrl)}@native`;
cc.assetManager._files.remove(cacheKey);
cc.assetManager.files.remove(cacheKey);
this.cachedFiles.remove(caches[i].originUrl);
}

Expand Down

0 comments on commit 7e88235

Please sign in to comment.