mirror of
https://github.com/appwrite/console.git
synced 2026-06-06 19:27:48 +00:00
fix: use lenght instead of total for condition checks
This commit is contained in:
@@ -284,7 +284,7 @@
|
||||
|
||||
async function checkForFreeOrgOverflow() {
|
||||
const orgs = await sdk.forConsole.teams.list([Query.equal('billingPlan', 'tier-0')]);
|
||||
if (orgs.total > 1) {
|
||||
if (orgs?.teams?.length > 1) {
|
||||
headerAlert.add({
|
||||
id: 'freeOrgOverflow',
|
||||
component: TooManyFreOrgs,
|
||||
@@ -452,7 +452,7 @@
|
||||
$actionRequiredInvoices = await sdk.forConsole.billing.listInvoices($organization.$id, [
|
||||
Query.equal('status', 'requires_authentication')
|
||||
]);
|
||||
if ($actionRequiredInvoices && $actionRequiredInvoices.total) {
|
||||
if ($actionRequiredInvoices && $actionRequiredInvoices?.invoices?.length > 0) {
|
||||
headerAlert.add({
|
||||
id: 'paymentAuthRequired',
|
||||
component: PaymentAuthRequired,
|
||||
|
||||
Reference in New Issue
Block a user