Skip to content
This repository was archived by the owner on Feb 27, 2024. It is now read-only.

Commit ae567a1

Browse files
committed
eslint fixes
1 parent 9cc4967 commit ae567a1

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

components/blocks/Gutenberg/BlockEmbed/BlockEmbed.js

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -33,24 +33,24 @@ export default function BlockEmbed({
3333
if (providerNameSlug === 'twitter') {
3434
setLoadTweet(1)
3535
}
36-
})
36+
}, [providerNameSlug])
37+
38+
if (!url) {
39+
return
40+
}
3741

3842
return (
3943
<>
40-
{!!url && (
41-
<>
42-
{!!loadTweet && (
43-
<Tweet className={className} url={url} caption={caption} />
44-
)}
45-
{!!supportedVideoTypes.includes(providerNameSlug) && (
46-
<VideoEmbed
47-
className={className}
48-
url={url}
49-
caption={caption}
50-
type={providerNameSlug}
51-
/>
52-
)}
53-
</>
44+
{!!loadTweet && (
45+
<Tweet className={className} url={url} caption={caption} />
46+
)}
47+
{!!supportedVideoTypes.includes(providerNameSlug) && (
48+
<VideoEmbed
49+
className={className}
50+
url={url}
51+
caption={caption}
52+
type={providerNameSlug}
53+
/>
5454
)}
5555
</>
5656
)

0 commit comments

Comments
 (0)