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: removeCue with native/same cues #4208

Merged
merged 2 commits into from
Mar 23, 2017
Merged

fix: removeCue with native/same cues #4208

merged 2 commits into from
Mar 23, 2017

Conversation

brandonocasey
Copy link
Contributor

@brandonocasey brandonocasey commented Mar 16, 2017

Description

This PR fixes two issues:

  1. If you add two of the same cues to the cues list they will both be removed by one call to removeCue
  2. If you create an add a native cue to the cues list. You cannot use the native cue to remove the cue that was added to the cue list.

Requirements Checklist

  • Feature implemented / Bug fixed
  • If necessary, more likely in a feature request than a bug fix
    • Unit Tests updated or fixed
  • Reviewed by Two Core Contributors

@brandonocasey brandonocasey changed the title fix: use cue that was passed to addCue to removeCue fix: removeCue with native/same cues Mar 16, 2017
Copy link
Member

@gkatsev gkatsev left a comment

Choose a reason for hiding this comment

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

One minor comment, LGTM otherwise.

this.cues_.splice(i, 1);
removed = true;
this.cues.setCues_(this.cues_);
return;
Copy link
Member

Choose a reason for hiding this comment

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

probably more appropriate to use break here.

@brandonocasey brandonocasey merged commit f2b5a05 into master Mar 23, 2017
@gkatsev gkatsev deleted the fix/remove-cue branch March 24, 2017 22:34
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.

2 participants