Skip to content

Commit 2b56c55

Browse files
authored
fix instruction widget expanded height (#2666)
1 parent 9830a5b commit 2b56c55

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

src/components/Widgets/TaskInstructionsWidget/TaskInstructionsWidget.jsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,8 @@ export default class TaskInstructionsWidget extends Component {
8787

8888
const { expandedHeight } = this.props.widgetConfiguration;
8989

90-
//Users who spam clicked and have bad user settings need this check.
91-
//Ssomehow expandedHeight becomes the minHeight when a race condition occurs
92-
const height =
93-
expandedHeight === descriptor.minHeight ? descriptor.defaultHeight : expandedHeight;
90+
// Use the user's saved height if available, otherwise use default height
91+
const height = Number.isFinite(expandedHeight) ? expandedHeight : descriptor.defaultHeight;
9492

9593
return this.props.updateWidgetHeight(this.props.widgetLayout.i, height);
9694
}

0 commit comments

Comments
 (0)