Skip to content

Commit b4ece61

Browse files
Merge pull request #5120 from Hacker0x01/fix-website
try fixing JS error on website
2 parents 04d759c + a2b15ad commit b4ece61

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/time.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,8 @@ export default class Time extends Component<TimeProps, TimeState> {
187187

188188
renderTimes = (): JSX.Element[] => {
189189
let times: Date[] = [];
190-
const format = this.props.format ? this.props.format : "p";
190+
const format =
191+
typeof this.props.format === "string" ? this.props.format : "p";
191192
const intervals = this.props.intervals ?? Time.defaultProps.intervals;
192193

193194
const activeDate =

0 commit comments

Comments
 (0)