Skip to content

Commit

Permalink
refactor: iterate tarjetas with array
Browse files Browse the repository at this point in the history
  • Loading branch information
Yizack committed Nov 7, 2024
1 parent 0b84e37 commit dff943f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions app/pages/app/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -119,12 +119,12 @@ onMounted(async () => {
}
const getTarjetas = await DB.getTarjetas();
const entries = (getTarjetas).entries();
for (const [i, tarjeta] of entries) {
for (const tarjeta of getTarjetas) {
tarjetas.value.push(tarjeta);
await CAPACITOR.showToast(`${t("tarjeta_added")}: ${tarjeta.numero}`);
if (getTarjetas.length - 1 === i) break;
if (tarjeta.saldo) {
await CAPACITOR.showToast(`${t("tarjeta_added")}: ${tarjeta.numero}`);
}
await sleep(0.5);
}
Expand Down

0 comments on commit dff943f

Please sign in to comment.