Skip to content

Commit

Permalink
fix(ui5-timepicker): fix error thrown upon selection from the clock (#…
Browse files Browse the repository at this point in the history
…9541)

Previously when selecting a time from the clock there was an error being thrown due to a check in the TimePickerClock class.
The reason an error was thrown was due to a check if a radius property was absent from an internal object, which in some cases was yet undefined, therefore trying to access that property resulted in an error.
With this change we fix that.
  • Loading branch information
hinzzx authored Jul 30, 2024
1 parent 10b697d commit 7b4cf30
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion packages/main/src/TimePickerClock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,19 @@ class TimePickerClock extends UI5Element {
* Keeps variables used in interaction calculations.
*/
@property({ type: Object })
_dimensionParameters!: TimePickerClockDimensions;
_dimensionParameters: TimePickerClockDimensions = {
radius: 0,
centerX: 0,
centerY: 0,
dotHeight: 0,
numberHeight: 0,
outerMax: 0,
outerMin: 0,
innerMax: 0,
innerMin: 0,
offsetX: 0,
offsetY: 0,
};

/**
* Mousedown or Touchstart event flag.
Expand Down

0 comments on commit 7b4cf30

Please sign in to comment.