Skip to content

Commit a81edaa

Browse files
author
Faisal Alqadi
committed
better handling
1 parent 4260a62 commit a81edaa

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

browser/src/models/GraphManager.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,13 @@ export default class GraphManager {
4242
// classInfo is optional
4343
}
4444
try {
45-
let manifestResponse: any = {}
4645
try {
47-
manifestResponse = await axios.get(manifestUrl)
46+
let manifestResponse = await axios.get(manifestUrl)
47+
this.componentSet = manifestResponse.data as ComponentSet;
4848
} catch {
49-
manifestResponse = await axios.get(gzippedManifestUrl, {responseType: 'arraybuffer', 'decompress': true })
49+
let manifestResponse = await axios.get(gzippedManifestUrl, {responseType: 'arraybuffer', 'decompress': true })
50+
this.componentSet = JSON.parse(pako.inflate(manifestResponse.data, { to: 'string' })) as ComponentSet;
5051
}
51-
this.componentSet = JSON.parse(pako.inflate(manifestResponse.data, { to: 'string' })) as ComponentSet;
5252
this.populateCaches();
5353
} catch {
5454
return false;

0 commit comments

Comments
 (0)