Skip to content

Commit

Permalink
fix format date
Browse files Browse the repository at this point in the history
  • Loading branch information
foxriver76 committed Aug 11, 2022
1 parent 12fdbae commit 35f1eaa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/adapter/src/lib/_Types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export interface AdapterOptionsConfig {
export interface InternalFormatDateOptions {
dateObj: string | Date | number;
isDuration: boolean;
_format: string;
_format?: string;
}

export interface AliasDetails {
Expand Down
4 changes: 3 additions & 1 deletion packages/adapter/src/lib/adapter/adapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6677,7 +6677,9 @@ export class AdapterClass extends EventEmitter {
}

Utils.assertBoolean(isDuration, 'isDuration');
Utils.assertString(_format, 'format');
if (_format !== undefined) {
Utils.assertString(_format, 'format');
}

return this._formatDate({ dateObj: dateObj as any, isDuration, _format });
}
Expand Down

0 comments on commit 35f1eaa

Please sign in to comment.