Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ui: Fix circumstances where there is only a single label #2922

Merged
merged 2 commits into from
Apr 4, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions ui/packages/shared/profile/src/ProfileExplorer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ const ProfileExplorerApp = ({
useEffect(() => {
const mergeFrom = merge_from_a ?? undefined;
const mergeTo = merge_to_a ?? undefined;
const labels = (labels_a as string[]) ?? [''];
const labels = typeof labels_a === 'string' ? [labels_a] : (labels_a as string[]) ?? [''];
const profileA = ProfileSelectionFromParams(
expression_a,
from_a as string,
Expand All @@ -142,7 +142,7 @@ const ProfileExplorerApp = ({
useEffect(() => {
const mergeFrom = merge_from_b ?? undefined;
const mergeTo = merge_to_b ?? undefined;
const labels = (labels_b as string[]) ?? [''];
const labels = typeof labels_b === 'string' ? [labels_b] : (labels_b as string[]) ?? [''];
const profileB = ProfileSelectionFromParams(
expression_b,
from_b as string,
Expand Down