Skip to content

Commit

Permalink
fix(web): storage fetchConfig returns null instead of undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
imobachgs committed Jan 21, 2025
1 parent 6901956 commit 02b35cf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions web/src/api/storage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ import { config } from "~/api/storage/types";
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const probe = (): Promise<any> => post("/api/storage/probe");

const fetchConfig = (): Promise<config.Config | undefined> =>
get("/api/storage/config").then((config) => config.storage);
const fetchConfig = (): Promise<config.Config | null> =>
get("/api/storage/config").then((config) => config.storage ?? null);

/**
* Returns the list of jobs
Expand Down

0 comments on commit 02b35cf

Please sign in to comment.