Skip to content

Commit

Permalink
Fix not-null assertion bug from orig PR
Browse files Browse the repository at this point in the history
Signed-off-by: Yu Long <[email protected]>
  • Loading branch information
yulong-db committed Oct 22, 2024
1 parent 66420c3 commit 87d2858
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/ui/react-app/src/pages/graph/TimeInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ class TimeInput extends Component<TimeInputProps> {
this.$time.on('change.datetimepicker', (e: any) => {
// The end time can also be set by dragging a section on the graph,
// and that value will have decimal places.
if (e.date && e.date.valueOf() !== Math.trunc(this.props.time?.valueOf()!)) {
if (e.date && e.date.valueOf() !== Math.trunc(this.props.time?.valueOf() ?? 0)) {
this.props.onChangeTime(e.date.valueOf());
}
});
Expand Down

0 comments on commit 87d2858

Please sign in to comment.