Fix issue with trying to match() on undefined
This commit is contained in:
parent
052befa581
commit
1136db24cc
|
@ -97,7 +97,8 @@ export const statusType = (status) => {
|
|||
return 'retweet'
|
||||
}
|
||||
|
||||
if ((typeof status.uri === 'string' && status.uri.match(/(fave|objectType=Favourite)/)) || status.text.match(/favorited/)) {
|
||||
if ((typeof status.uri === 'string' && status.uri.match(/(fave|objectType=Favourite)/)) ||
|
||||
(typeof status.text === 'string' && status.text.match(/favorited/))) {
|
||||
return 'favorite'
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue