Skip to content

Commit a2cca78

Browse files
committed
Changed indentation back to original in useDownloadURL.ts
1 parent 401d3e8 commit a2cca78

File tree

1 file changed

+14
-11
lines changed

1 file changed

+14
-11
lines changed

storage/useDownloadURL.ts

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,20 @@ export default (storageRef?: storage.Reference | null): DownloadURLHook => {
1414
>();
1515
const ref = useComparatorRef(storageRef, isEqual, reset);
1616

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-
17+
useEffect(
18+
() => {
19+
if (!ref.current) {
20+
setValue(undefined);
21+
return;
22+
}
23+
ref.current
24+
.getDownloadURL()
25+
.then(setValue)
26+
.catch(setError);
27+
},
28+
[ref.current]
29+
);
30+
2831
return {
2932
error,
3033
loading,

0 commit comments

Comments
 (0)