Skip to content

Commit ccf2dc6

Browse files
committed
Simplify datasets assignment
1 parent 453aa83 commit ccf2dc6

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

extensions/ql-vscode/src/view/compare-performance/ComparePerformance.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ function ComparePerformanceWithData(props: {
369369
}) {
370370
const { data } = props;
371371

372-
const datasets = useMemo(
372+
const { from, to } = useMemo(
373373
() => ({
374374
from: new ComparisonDataset(data.from),
375375
to: new ComparisonDataset(data.to),
@@ -387,8 +387,6 @@ function ComparePerformanceWithData(props: {
387387

388388
const [metric, setMetric] = useState<Metric>(metrics.tuples);
389389

390-
const { from, to } = datasets;
391-
392390
const nameSet = new Set(from.data.names);
393391
for (const name of to.data.names) {
394392
nameSet.add(name);

0 commit comments

Comments
 (0)