Skip to content

Commit

Permalink
fix: safely check nezhaWsData.servers before rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
hamster1963 committed Jan 27, 2025
1 parent d302df8 commit 964e53e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/DashCommand.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export function DashCommand() {
<CommandInput placeholder={t("TypeCommand")} value={search} onValueChange={setSearch} />
<CommandList>
<CommandEmpty>{t("NoResults")}</CommandEmpty>
{nezhaWsData.servers.length > 0 && (
{nezhaWsData.servers && nezhaWsData.servers.length > 0 && (
<>
<CommandGroup heading={t("Servers")}>
{nezhaWsData.servers.map((server) => (
Expand Down

0 comments on commit 964e53e

Please sign in to comment.