Fix responsive iframe embed bug
This commit is contained in:
parent
603b68f3bd
commit
10b4018a9f
1 changed files with 11 additions and 8 deletions
|
|
@ -37,11 +37,14 @@ const ImageWithSrcset = ({ nodeKey, src, alt, ...props }) => {
|
|||
)
|
||||
}
|
||||
|
||||
const HtmlBlock = ({ value }) => (
|
||||
<div
|
||||
className={value.indexOf('iframe') ? `Content--Iframe` : ``}
|
||||
dangerouslySetInnerHTML={{
|
||||
__html: value
|
||||
}}
|
||||
/>
|
||||
)
|
||||
const HtmlBlock = ({ value }) => {
|
||||
if (value.indexOf('<iframe') !== 0) return value
|
||||
return (
|
||||
<div
|
||||
className={`Content--Iframe`}
|
||||
dangerouslySetInnerHTML={{
|
||||
__html: value
|
||||
}}
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue