app/javascript/mastodon/components/hashtag.js: Do not crash when hashtag.history is undefined
This commit is contained in:
parent
6b3614ae4c
commit
1af76fae0e
2 changed files with 2 additions and 2 deletions
|
@ -20,7 +20,7 @@ const Hashtag = ({ hashtag }) => (
|
|||
</div>
|
||||
|
||||
<div className='trends__item__sparkline'>
|
||||
<Sparklines width={50} height={28} data={hashtag.get('history').reverse().map(day => day.get('uses')).toArray()}>
|
||||
<Sparklines width={50} height={28} data={hashtag.get('history') && hashtag.get('history').reverse().map(day => day.get('uses')).toArray()}>
|
||||
<SparklinesCurve style={{ fill: 'none' }} />
|
||||
</Sparklines>
|
||||
</div>
|
||||
|
|
|
@ -20,7 +20,7 @@ const Hashtag = ({ hashtag }) => (
|
|||
</div>
|
||||
|
||||
<div className='trends__item__sparkline'>
|
||||
<Sparklines width={50} height={28} data={hashtag.get('history').reverse().map(day => day.get('uses')).toArray()}>
|
||||
<Sparklines width={50} height={28} data={hashtag.get('history') && hashtag.get('history').reverse().map(day => day.get('uses')).toArray()}>
|
||||
<SparklinesCurve style={{ fill: 'none' }} />
|
||||
</Sparklines>
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue