fix(sla): adiciona verificacao segura de company.id
Some checks failed
CI/CD Web + Desktop / Deploy Convex functions (push) Blocked by required conditions
CI/CD Web + Desktop / Detect changes (push) Successful in 5s
Quality Checks / Lint, Test and Build (push) Has been cancelled
CI/CD Web + Desktop / Deploy (VPS Linux) (push) Has been cancelled

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
rever-tecnologia 2025-12-17 19:43:18 -03:00
parent a55f889689
commit a2fa5d046c

View file

@ -81,14 +81,14 @@ export function CompanySlaDrawer({ company, tenantId, viewerId, onClose }: Compa
const [deleting, setDeleting] = useState(false)
const drawerOpen = Boolean(company)
const canLoad = Boolean(company && viewerId)
const canLoad = Boolean(company?.id && viewerId)
const existing = useQuery(
api.companySlas.get,
canLoad
canLoad && company?.id
? {
tenantId,
viewerId: viewerId as Id<"users">,
companyId: company!.id as Id<"companies">,
companyId: company.id as Id<"companies">,
}
: "skip"
) as {