We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2c5509d commit b0a8146Copy full SHA for b0a8146
src/explorer.ts
@@ -82,7 +82,7 @@ export class Explorer {
82
83
const configFile = manifest[0].Config;
84
const config = JSON.parse(await readFile(path.join(tmpdir, configFile), 'utf-8'));
85
- const history: History[] = config.history;
+ const history: History[] | undefined = config.history;
86
const layersResult: extensionApi.ImageFilesystemLayer[] = [];
87
for (const layer of layers) {
88
const currentLayer: extensionApi.ImageFilesystemLayer = {
@@ -125,7 +125,7 @@ export class Explorer {
125
}
126
127
let i = layersResult.length - 1;
128
- for (const histo of history.slice().reverse()) {
+ for (const histo of history?.slice().reverse() ?? []) {
129
if (histo.empty_layer) {
130
continue;
131
0 commit comments