Skip to content
This repository has been archived by the owner on Jun 29, 2018. It is now read-only.

[#960183] Ensure we remove ready callbacks when they are called. #368

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ScottDowne
Copy link
Contributor

No description provided.

playerReadyCallbacks[ i ]();
delete playerReadyCallbacks[ i ];
while( playerReadyCallbacks.length ) {
playerReadyCallbacks[ 0 ]();
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's shift first:

var cb = playerReadyCallbacks.shift();
cb();

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Going to declare the callback at the top of this function scope, but otherwise, no isses.

haha, or playerReadyCallbacks.shift()();

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

Successfully merging this pull request may close these issues.

2 participants