Skip to content

Commit

Permalink
[test] Fix AdapterDayjs coverage calculation (#14957)
Browse files Browse the repository at this point in the history
  • Loading branch information
LukasTy authored Oct 14, 2024
1 parent 5b48909 commit 46df966
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/x-date-pickers/src/AdapterDayjs/AdapterDayjs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,8 @@ export class AdapterDayjs implements MuiPickersAdapter<Dayjs, string> {
const timezone = this.getTimezone(value);
if (timezone !== 'UTC') {
const fixedValue = value.tz(this.cleanTimezone(timezone), true);
// TODO: Simplify the case when we raise the `dayjs` peer dep to 1.11.12 (https://github.com/iamkun/dayjs/releases/tag/v1.11.12)
/* istanbul ignore next */
// @ts-ignore
if (fixedValue.$offset === (value.$offset ?? 0)) {
return value;
Expand Down

0 comments on commit 46df966

Please sign in to comment.