Fixing no parseable (by the i18n extractor) optional chaining construction (#2387)

This commit is contained in:
Jesús Espino 2018-11-28 16:37:23 +01:00 committed by Elias Nahum
parent 0feee89cfd
commit b46f336c05
No known key found for this signature in database
GPG key ID: E038DB71E0B61702

View file

@ -52,11 +52,17 @@ function makeMapStateToProps() {
const previewsEnabled = getBool(state, Preferences.CATEGORY_ADVANCED_SETTINGS, `${ViewTypes.FEATURE_TOGGLE_PREFIX}${ViewTypes.EMBED_PREVIEW}`) ||
getBool(state, Preferences.CATEGORY_DISPLAY_SETTINGS, Preferences.LINK_PREVIEW_DISPLAY, true);
let openGraphData = getOpenGraphMetadataForUrl(state, link);
if (!openGraphData) {
const data = getOpenGraphData(ownProps.metadata, link);
openGraphData = data?.data;
}
return {
...getDimensions(state),
googleDeveloperKey: config.GoogleDeveloperKey,
link,
openGraphData: getOpenGraphMetadataForUrl(state, link) || getOpenGraphData(ownProps.metadata, link)?.data,
openGraphData,
showLinkPreviews: previewsEnabled && config.EnableLinkPreviews === 'true',
theme: getTheme(state),
};