Hi Square team 👋
In the Node.js SDK README, the pagination example uses:
const page = await client.bankAccounts.list();
while (page.hasNextPage()) {
page = page.getNextPage();
}
However, this snippet will throw an error because page is declared as a const but then reassigned inside the loop
let page = await client.bankAccounts.list();
while (page.hasNextPage()) {
page = page.getNextPage();
}
Thanks,