Skip to content

Commit 1d068f0

Browse files
committed
Always send a nonempty sample
1 parent 52372b5 commit 1d068f0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/herbie/HerbieUI.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ function permuteSampleToExpressionOrder(sample: HerbieTypes.Sample, expressionTe
107107
const permutedIndices = permutedVars.map(v => specVars.indexOf(v));
108108

109109
const permutedSamplePoints = sample.points.map(([point, error]): [HerbieTypes.ordinalPoint, number] => {
110-
const newPoint: HerbieTypes.ordinalPoint = point.map((_, idx) => point[permutedIndices[idx]]);
110+
const newPoint: HerbieTypes.ordinalPoint = point.map((_, idx) => point[permutedIndices[idx] || 0]);
111111
return [newPoint, error];
112112
});
113113

0 commit comments

Comments
 (0)