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

Abort vjs.trigger when "elem" param is invalid #1610

Closed

Conversation

ghost
Copy link

@ghost ghost commented Oct 25, 2014

Related to #1484
vjs.hasData throws a fit (exception) and aborts the whole process when the "elem" param of vjs.trigger is null or undefined.
That easily broke testing with Karma.

It was discovered in Karma-jasmine tests LoveIsGrief/videojs-soundcloud/test/unit/main-spec.coffee#72. A new player is created in the beforeEach and disposed of in afterEach.

This is just treating the symptom, not cause, but I need it nonetheless to run the tests.

Cheers

Otherwise vjs.hasData throws a fit (exception) and aborts the whole process.
That easily broke testing with Karma.
@heff
Copy link
Member

heff commented Oct 28, 2014

I'm cautious about a fix like this because it would hide the error, making it more difficult to see potential memory leaks and failures to clean up intervals and listeners. @mmcc is working on a fix for the same issue that cleans up all player-related timeouts and intervals on dispose. I also just merged in #1588 which should help with these issues to some degree. I'd like to see if those don't stop this from happening first.

@heff
Copy link
Member

heff commented Oct 28, 2014

Going to close this but will reopen if we need to go this direction.

@heff heff closed this Oct 28, 2014
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.

1 participant