Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Missing URL causes extension-youtube to throw unhandled runtime error #6168

Open
1 task done
ssmirnow opened this issue Mar 10, 2025 · 0 comments
Open
1 task done
Labels
Category: Open Source The issue or pull reuqest is related to the open source packages of Tiptap. Type: Bug The issue or pullrequest is related to a bug

Comments

@ssmirnow
Copy link

Affected Packages

extension-youtube

Version(s)

2.9.0

Bug Description

One of our editors accidentally pasted empty youtube-like iframe:

<div data-youtube-video=""><iframe class="w-full aspect-video" width="640" height="480" allowfullscreen="true" autoplay="false" disablekbcontrols="false" enableiframeapi="false" endtime="0" ivloadpolicy="0" loop="false" modestbranding="false" origin="" playlist="" start="0"></iframe></div>

that caused youtube-plugin to fail on
TypeError: Cannot read properties of null (reading 'match').

Image

I think it should silently fallback instead of throwing an error that causes it's impossible to fix it without directly modifying DB (or temporarily disable youtube extension to fix it directly in tiptap).

Browser Used

Chrome

Code Example URL

No response

Expected Behavior

Throw a console error rather than unhandled runtime error

Additional Context (Optional)

No response

Dependency Updates

  • Yes, I've updated all my dependencies.
@ssmirnow ssmirnow added Category: Open Source The issue or pull reuqest is related to the open source packages of Tiptap. Type: Bug The issue or pullrequest is related to a bug labels Mar 10, 2025
@github-project-automation github-project-automation bot moved this to Needs Triage in Tiptap: Issues Mar 10, 2025
@ssmirnow ssmirnow changed the title [Bug]: [Bug]: Missing URL causes extension-youtube to throw unhandled runtime error Mar 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category: Open Source The issue or pull reuqest is related to the open source packages of Tiptap. Type: Bug The issue or pullrequest is related to a bug
Projects
Status: Needs Triage
Development

No branches or pull requests

1 participant