Skip to content

Commit

Permalink
[OPIK-438]: eslint issue patch;
Browse files Browse the repository at this point in the history
  • Loading branch information
Sasha committed Nov 21, 2024
1 parent f58a24b commit b904171
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,18 @@ const ExperimentDatasetItems = ({
selectedKeys,
}: ExperimentDatasetItemsProps) => {
const selectedData: DatasetItem["data"] = useMemo(() => {
if (!selectedKeys.length) {
if (!selectedKeys.length || !data) {
return {};
}

return pick(data, selectedKeys);
}, [selectedKeys, data]);

const showImages = hasImages && selectedData?.["images"];
// ALEX
const showImages = hasImages && (selectedData as never)?.["images"];

if (!showImages) {
return data ? <SyntaxHighlighter data={selectedData || {}} /> : <NoData />;
return data ? <SyntaxHighlighter data={selectedData} /> : <NoData />;
}

return (
Expand Down

0 comments on commit b904171

Please sign in to comment.