more promises
This commit is contained in:
parent
11054bdad7
commit
03ef01672e
5 changed files with 11 additions and 11 deletions
|
|
@ -316,7 +316,7 @@ export const getResourcesIndex = async (url, parser = (x) => x) => {
|
|||
const resourceTransform = (resources) => {
|
||||
return Object.entries(resources).map(([k, v]) => {
|
||||
if (typeof v === 'object') {
|
||||
return [k, () => Promise.resolve(v)]
|
||||
return [k, () => v]
|
||||
} else if (typeof v === 'string') {
|
||||
return [
|
||||
k,
|
||||
|
|
@ -361,5 +361,5 @@ export const getResourcesIndex = async (url, parser = (x) => x) => {
|
|||
if (total.length === 0) {
|
||||
throw new Error(`Resource at ${url} and ${customUrl} completely unavailable. Panicking`)
|
||||
}
|
||||
return Promise.resolve(Object.fromEntries(total))
|
||||
return Object.fromEntries(total)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue