mirror of
https://github.com/supabase/supabase.git
synced 2026-10-05 09:25:06 +03:00
fix(studio): support for language feature in Storage.utils.ts (#41402)
Iterator.prototype.map() is only newly baseline available, which is causing problems with older browsers. Switched to Array.from(<iterator>) since that (and Map as an iterable) date from 2015/2016
This commit is contained in:
1 parent
78fd7350f9
commit
92db6bf4fa
1 file changed
+4
-3
@@ -101,9 +101,10 @@ const groupPoliciesByBucket = (policies: (PostgresPolicy & { bucket: string | Sy
|
||||
}
|
||||
policiesByBucket.get(policy.bucket)?.push(policy)
|
||||
})
|
||||
return [
|
||||
...policiesByBucket.entries().map(([bucketName, policies]) => ({ name: bucketName, policies })),
|
||||
]
|
||||
return Array.from(policiesByBucket).map(([bucketName, policies]) => ({
|
||||
name: bucketName,
|
||||
policies,
|
||||
}))
|
||||
}
|
||||
|
||||
export const createPayloadsForAddPolicy = (
|
||||
|
||||
Reference in new issue
Block a user