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

Added check for youtube destroy method in beforeDestroy #27

Merged
merged 3 commits into from
Aug 24, 2017

Conversation

basschuitema
Copy link

We're using Vue-storybook (instead of Vue-Play) together with vue-youtube-embed. When I change a property of a component (in storybook) the beforeDestroy is executed, but for some reason the Youtube API destory method is not a function.

The error:
Error in beforeDestroy hook: "TypeError: this.player.destroy is not a function"

To prevent this I added a check if the method is there, before executing it. This solves the issue.

@kaorun343
Copy link
Owner

@basschuitema

Hi. Thanks for your PR.

Could you update the file in source instead of lib/vue-youtube-embed.js?
Then, I'll merge this.

@basschuitema
Copy link
Author

Thanks for your reply!
I reverted the commit on the /lib/ directory and applied the fix to the source directory.
Greets

@kaorun343 kaorun343 merged commit e7abc05 into kaorun343:master Aug 24, 2017
@basschuitema
Copy link
Author

basschuitema commented Aug 24, 2017

@kaorun343
Thanks for merging my pull request. Can you tell me when you are going to release the next version with this fix?

@kaorun343
Copy link
Owner

@basschuitema

I've done doing this. version 2.1.2 is available now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants