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
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:
parent
a55f889689
commit
a2fa5d046c
1 changed files with 3 additions and 3 deletions
|
|
@ -81,14 +81,14 @@ export function CompanySlaDrawer({ company, tenantId, viewerId, onClose }: Compa
|
||||||
const [deleting, setDeleting] = useState(false)
|
const [deleting, setDeleting] = useState(false)
|
||||||
const drawerOpen = Boolean(company)
|
const drawerOpen = Boolean(company)
|
||||||
|
|
||||||
const canLoad = Boolean(company && viewerId)
|
const canLoad = Boolean(company?.id && viewerId)
|
||||||
const existing = useQuery(
|
const existing = useQuery(
|
||||||
api.companySlas.get,
|
api.companySlas.get,
|
||||||
canLoad
|
canLoad && company?.id
|
||||||
? {
|
? {
|
||||||
tenantId,
|
tenantId,
|
||||||
viewerId: viewerId as Id<"users">,
|
viewerId: viewerId as Id<"users">,
|
||||||
companyId: company!.id as Id<"companies">,
|
companyId: company.id as Id<"companies">,
|
||||||
}
|
}
|
||||||
: "skip"
|
: "skip"
|
||||||
) as {
|
) as {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue