fast fetch data at start
This commit is contained in:
@@ -89,7 +89,8 @@ const showSources = ref(true);
|
|||||||
(() => {
|
(() => {
|
||||||
let idx = -1;
|
let idx = -1;
|
||||||
const loop = async () => {
|
const loop = async () => {
|
||||||
setTimeout(loop, TIMEOUT / dataSources.length);
|
const fast = prices.value.length < dataSources.length;
|
||||||
|
setTimeout(loop, fast ? 0 : TIMEOUT / dataSources.length);
|
||||||
idx = (idx + 1) % dataSources.length;
|
idx = (idx + 1) % dataSources.length;
|
||||||
try {
|
try {
|
||||||
const source = dataSources[idx];
|
const source = dataSources[idx];
|
||||||
|
|||||||
Reference in New Issue
Block a user