Skip to content

Commit fcee27c

Browse files
committed
debug restoredLayerKeysThatMayUndefined
1 parent 903f7f2 commit fcee27c

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/LayerCache.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -173,14 +173,14 @@ class LayerCache {
173173

174174
private async restoreLayers() {
175175
const restoring = (await this.getLayerIds()).map(layerId => this.restoreSingleLayerBy(layerId))
176-
const hasRestored = await Promise.all(restoring)
177-
const FailedToRestore = (restored: Boolean) => !restored
178-
return hasRestored.filter(FailedToRestore).length === 0
176+
const restoredLayerKeysThatMayContainUndefined = await Promise.all(restoring)
177+
core.debug(JSON.stringify({ hasRestored: restoredLayerKeysThatMayContainUndefined }))
178+
const FailedToRestore = (restored: string | undefined) => restored === undefined
179+
return restoredLayerKeysThatMayContainUndefined.filter(FailedToRestore).length === 0
179180
}
180181

181-
private async restoreSingleLayerBy(id: string): Promise<boolean> {
182-
const restoredCacheKeyMayUndefined = await cache.restoreCache([this.genSingleLayerStorePath(id)], this.genSingleLayerStoreKey(id))
183-
return typeof restoredCacheKeyMayUndefined === `string`
182+
private async restoreSingleLayerBy(id: string): Promise<string | undefined> {
183+
return await cache.restoreCache([this.genSingleLayerStorePath(id)], this.genSingleLayerStoreKey(id))
184184
}
185185

186186
private async loadImageFromUnpacked() {

0 commit comments

Comments
 (0)