mirror of
https://github.com/freedbygrace/ActiveDirectoryManager.git
synced 2026-07-27 12:29:42 +00:00
Fix: Handle potential undefined values in LDAP query builder and database queries.
Replit-Commit-Author: Agent Replit-Commit-Session-Id: 705f2157-ef97-4fbd-89e4-8c7f2ecaea90 Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/7ed01c5f-a82d-405a-b728-b2e3d127c60c/e6f1810b-5d83-4907-ac49-d7d4e6aaf193.jpg
This commit is contained in:
@@ -80,28 +80,28 @@ const LdapQueryBuilderPage = () => {
|
||||
|
||||
// Query to get LDAP connections
|
||||
const {
|
||||
data: connections,
|
||||
data: connections = [],
|
||||
isLoading: connectionsLoading
|
||||
} = useQuery({
|
||||
} = useQuery<LdapConnection[]>({
|
||||
queryKey: ["/api/ldap-connections"],
|
||||
enabled: !!user
|
||||
});
|
||||
|
||||
// Query to get LDAP filters for the selected connection
|
||||
const {
|
||||
data: filters,
|
||||
data: filters = [],
|
||||
isLoading: filtersLoading
|
||||
} = useQuery({
|
||||
} = useQuery<LdapFilter[]>({
|
||||
queryKey: ["/api/connections", selectedConnectionId, "ldap-filters"],
|
||||
enabled: !!selectedConnectionId,
|
||||
});
|
||||
|
||||
// Query to get LDAP filter revisions
|
||||
const {
|
||||
data: revisions,
|
||||
data: revisions = [],
|
||||
isLoading: revisionsLoading,
|
||||
refetch: refetchRevisions
|
||||
} = useQuery({
|
||||
} = useQuery<LdapFilterRevision[]>({
|
||||
queryKey: ["/api/ldap-filters", selectedFilter?.id, "revisions"],
|
||||
enabled: !!selectedFilter?.id && showRevisionsDialog,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user