Skip to content

Commit

Permalink
Don't crash on tracks.json missing
Browse files Browse the repository at this point in the history
  • Loading branch information
bananu7 committed Sep 14, 2023
1 parent 1fe6992 commit 746d04c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/filebrowser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ export async function getFile(token: string, path: string, name: string): Promis
export async function getJsonFile(token: string, path: string, name: string): Promise<any|null> {
try {
const response = await getFile(token, path, name);
if (!response)
return null;
const json = await response.json();
return json;
} catch (error) {
Expand Down

0 comments on commit 746d04c

Please sign in to comment.