promises
This commit is contained in:
parent
88b2f89877
commit
11054bdad7
7 changed files with 17 additions and 21 deletions
|
|
@ -359,11 +359,7 @@ export const getResourcesIndex = async (url, parser = (x) => x) => {
|
|||
|
||||
const total = [...custom, ...builtin]
|
||||
if (total.length === 0) {
|
||||
return Promise.reject(
|
||||
new Error(
|
||||
`Resource at ${url} and ${customUrl} completely unavailable. Panicking`,
|
||||
),
|
||||
)
|
||||
throw new Error(`Resource at ${url} and ${customUrl} completely unavailable. Panicking`)
|
||||
}
|
||||
return Promise.resolve(Object.fromEntries(total))
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue