fixed value error
This commit is contained in:
parent
15c38dd91d
commit
082b462188
@ -8,11 +8,14 @@ import React from 'react'
|
||||
export default class RelativeTime extends React.Component {
|
||||
|
||||
render() {
|
||||
let time = moment.utc(this.props.value);
|
||||
if (!this.props.value) {
|
||||
return null;
|
||||
}
|
||||
|
||||
let time = moment.utc(this.props.value);
|
||||
return (
|
||||
<span>{time.fromNow(this.props.suffix)}</span>
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user