Fix issue with trying to match() on undefined

feature/client-side-greentext
Shpuld Shpuldson 7 years ago
parent 052befa581
commit 1136db24cc

@ -97,7 +97,8 @@ export const statusType = (status) => {
return 'retweet' 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' return 'favorite'
} }

Loading…
Cancel
Save