'Files' is possibly null

Below is where I implemented it
const fetchPosts=useCallback(async()=>{


const { data:files } = await supabase
.storage
.from('files')
.list()

for (const file of files) {
const { data } = await supabase.storage.from('bucket').createSignedUrl(file.name, 600000)

}


},[])
const fetchPosts=useCallback(async()=>{


const { data:files } = await supabase
.storage
.from('files')
.list()

for (const file of files) {
const { data } = await supabase.storage.from('bucket').createSignedUrl(file.name, 600000)

}


},[])
Solution:
Below is where I implemented it ```const fetchPosts=useCallback(async()=>{
const { data:files } = await supabase .storage...
Jump to solution
2 Replies
willm
willm2y ago
Supabase has a discord
Revaycolizer
RevaycolizerOP2y ago
already solved it bruh
Want results from more Discord servers?
Add your server