Skip to content

Commit 649d981

Browse files
committed
add all providers to prefetch
1 parent bfee2d2 commit 649d981

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

prefetch.js

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,9 @@ optimade.getProviders().then(async () => {
4444
: '0';
4545
};
4646
const nums = detail(res.errors).match(/\d+/g).filter(n => +n < max).map(n => +n);
47-
if (!nums.includes(0))
48-
return {
49-
[k]: { ...v, attributes: { ...v.attributes, api_version: api, ['query_limits']: nums } }
50-
};
47+
return {
48+
[k]: { ...v, attributes: { ...v.attributes, api_version: api, ['query_limits']: !nums.includes(0) ? nums : [10] } }
49+
};
5150
} catch (error) {
5251
console.log(error);
5352
}
@@ -59,8 +58,8 @@ optimade.getProviders().then(async () => {
5958
return { ...acc, ...provider };
6059
}, Promise.resolve({}));
6160

62-
//const log = { prefetched: Object.keys(providers).length, source: Object.keys(source).length };
63-
//console.log(log);
61+
const log = { prefetched: Object.keys(providers).length, source: Object.keys(source).length };
62+
console.log(log);
6463

6564
return providers;
6665
}

0 commit comments

Comments
 (0)