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

fix(html5): (un)patchCanPlayType could set native canPlayType to null #3863

Merged
merged 1 commit into from
Dec 15, 2016

Conversation

gkatsev
Copy link
Member

@gkatsev gkatsev commented Dec 15, 2016

Description

unpatchCanPlayType and patchCanPlayType were causing issues, particularly in tests because they could end up setting the canPlayType method to null if called in the right order. This fixes it so that unpatching will always restore the native canPlayType method.

Copy link
Contributor

@brandonocasey brandonocasey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems quite a bit safer to me, module level globals like that should all be const. Nice one! 👍

@gkatsev gkatsev merged commit 559297a into master Dec 15, 2016
@gkatsev gkatsev deleted the patch-can-play-type branch December 15, 2016 19:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants