We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 401d3e8 commit a2cca78Copy full SHA for a2cca78
storage/useDownloadURL.ts
@@ -14,17 +14,20 @@ export default (storageRef?: storage.Reference | null): DownloadURLHook => {
14
>();
15
const ref = useComparatorRef(storageRef, isEqual, reset);
16
17
- useEffect(() => {
18
- if (!ref.current) {
19
- setValue(undefined);
20
- return;
21
- }
22
- ref.current
23
- .getDownloadURL()
24
- .then(setValue)
25
- .catch(setError);
26
- }, [ref.current]);
27
-
+ useEffect(
+ () => {
+ if (!ref.current) {
+ setValue(undefined);
+ return;
+ }
+ ref.current
+ .getDownloadURL()
+ .then(setValue)
+ .catch(setError);
+ },
28
+ [ref.current]
29
+ );
30
+
31
return {
32
error,
33
loading,
0 commit comments