File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
themes/icarus/layout/common Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -105,9 +105,11 @@ module.exports = class extends Component {
105105 }
106106
107107 // Only pass images prop to OpenGraph when we actually have images.
108+ // Ensure we pass an array (possibly empty) to OpenGraph so the component
109+ // never receives undefined and attempts to parse it.
108110 const openGraphImagesProp = ( Array . isArray ( openGraphImages ) && openGraphImages . length ) || typeof openGraphImages === 'string'
109111 ? openGraphImages
110- : undefined ;
112+ : [ ] ;
111113
112114 let structuredImages = images ;
113115 if ( ( typeof structured_data === 'object' && structured_data !== null )
@@ -119,7 +121,7 @@ module.exports = class extends Component {
119121
120122 const structuredImagesProp = ( Array . isArray ( structuredImages ) && structuredImages . length ) || typeof structuredImages === 'string'
121123 ? structuredImages
122- : undefined ;
124+ : [ ] ;
123125
124126 let followItVerificationCode = null ;
125127 if ( Array . isArray ( config . widgets ) ) {
You can’t perform that action at this time.
0 commit comments