Skip to content

Commit

Permalink
fix: allow null & undefined as storage reference
Browse files Browse the repository at this point in the history
  • Loading branch information
andipaetzold committed Oct 14, 2021
1 parent 3028de4 commit 3c95bd5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/storage/useDownloadURL.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { useStableStorageRef } from "./internal";

export type UseDownloadURLResult = ValueHookResult<string, StorageError>;

export function useDownloadURL(reference: StorageReference): UseDownloadURLResult {
export function useDownloadURL(reference: StorageReference | undefined | null): UseDownloadURLResult {
const isMounted = useIsMounted();
const { value, setValue, loading, setLoading, error, setError } = useLoadingValue<string, StorageError>();

Expand Down

0 comments on commit 3c95bd5

Please sign in to comment.