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

Video Block: Fix TypeError when removing poster. #34411

Merged
merged 1 commit into from Sep 1, 2021

Conversation

@getsource
Copy link
Member

@getsource getsource commented Aug 31, 2021

Description

While working on #21553, I noticed that removing a poster image from a video currently results in a TypeError:

Uncaught TypeError: this is undefined
    onRemovePoster edit.js:157

This PR removes a this reference, I'm guessing left over from the hooks conversion, fixing the TypeError.

Props @Mamaduka for recommending the fix.

How has this been tested?

  • Add Video Block
  • Select Video
  • Select Poster
  • Remove Poster
  • Notice that there is no longer a TypeError

Screenshots

Types of changes

Bug fix

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • I've tested my changes with keyboard and screen readers.
  • My code has proper inline documentation.
  • I've included developer documentation if appropriate.
  • I've updated all React Native files affected by any refactorings/renamings in this PR (please manually search all *.native.js files for terms that need renaming or removal).
@getsource getsource force-pushed the getsource:fix/remove-poster-typeerror branch from 2723266 to 199044f Sep 1, 2021
Copy link
Contributor

@ntsekouras ntsekouras left a comment

Thanks! 👍

@ntsekouras ntsekouras merged commit 412b015 into WordPress:trunk Sep 1, 2021
19 checks passed
19 checks passed
@github-actions
Compute current and next stable release branches
Details
@github-actions
Check (14)
Details
@github-actions
Checks (12)
Details
@github-actions
Admin - 1 Admin - 1
Details
@github-actions
Run performance tests
Details
@github-actions
test (gutenberg-editor-initial-html, 14)
Details
@github-actions
test (12.2, gutenberg-editor-initial-html, 14)
Details
@github-actions
JavaScript (12)
Details
@github-actions
Checks (14)
Details
@github-actions
Admin - 2 Admin - 2
Details
@github-actions
JavaScript (14)
Details
@github-actions
Admin - 3 Admin - 3
Details
@github-actions
Admin - 4 Admin - 4
Details
@github-actions
Bump version
Details
@github-actions
Build Release Artifact
Details
@github-actions
Mobile
Details
@github-actions
Create Release Draft and Attach Asset
Details
@github-actions github-actions bot added this to the Gutenberg 11.5 milestone Sep 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants