summaryrefslogtreecommitdiffstats
path: root/ui/src/components/moment-time.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'ui/src/components/moment-time.tsx')
-rw-r--r--ui/src/components/moment-time.tsx6
1 files changed, 4 insertions, 2 deletions
diff --git a/ui/src/components/moment-time.tsx b/ui/src/components/moment-time.tsx
index b7402e7e..c8826695 100644
--- a/ui/src/components/moment-time.tsx
+++ b/ui/src/components/moment-time.tsx
@@ -3,7 +3,8 @@ import * as moment from 'moment';
interface MomentTimeProps {
data: {
- published: string;
+ published?: string;
+ when_?: string;
updated?: string;
}
}
@@ -20,8 +21,9 @@ export class MomentTime extends Component<MomentTimeProps, any> {
<span title={this.props.data.updated} className="font-italics">modified {moment.utc(this.props.data.updated).fromNow()}</span>
)
} else {
+ let str = this.props.data.published || this.props.data.when_;
return (
- <span title={this.props.data.published}>{moment.utc(this.props.data.published).fromNow()}</span>
+ <span title={str}>{moment.utc(str).fromNow()}</span>
)
}
}