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:
Charis authored and GitHub committed 2025-12-16 16:30:09 +00:00
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 = (