Embeds: pasting a non-embeddable Facebook URL throws a TypeError #25108
Labels
[Block] Embed
Affects the Embed Block
[Status] In Progress
Tracking issues with work in progress
[Type] Regression
Related to a regression in the latest release
To reproduce
Start editing a post and paste the following URL:
It's a link to a Facebook page that is not embeddable. The oEmbed Proxy REST request returns a response with
html: false
:This then leads to an error being reported in console:
The offending function is isFromWordPress that calls
html.includes()
on itshtml
argument that isfalse
.The embed block UI then ends up like this:
Expected behavior
When testing on WordPress.com or on a self-hosted WordPress 5.4.2 with default editor, I see something more correct:
The fact that this works correctly with older versions of Gutenberg that are not bleeding edge suggests the bug is a recent regression. Maybe the refactoring in #24090 by @ntsekouras is the cause?
Editor version (please complete the following information):
master
The text was updated successfully, but these errors were encountered: