Skip to content

Commit b9cee35

Browse files
committed
fix(hosts-list): update loading state check to handle undefined hosts
1 parent 3defaaf commit b9cee35

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

dashboard/src/components/hosts/hosts-list.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1006,7 +1006,7 @@ export default function HostsList({ data, onAddHost, isDialogOpen, onSubmit, edi
10061006
onDataChanged: refreshHostsData,
10071007
})
10081008

1009-
const isCurrentlyLoading = !data || (isRefreshing && sortedHosts.length === 0)
1009+
const isCurrentlyLoading = hosts === undefined || (isRefreshing && sortedHosts.length === 0)
10101010
const isEmpty = !isCurrentlyLoading && filteredHosts.length === 0 && !searchQuery.trim() && sortedHosts.length === 0
10111011
const isSearchEmpty = !isCurrentlyLoading && filteredHosts.length === 0 && searchQuery.trim() !== ''
10121012

0 commit comments

Comments
 (0)