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

chore: use the new any event function #6080

Merged
merged 3 commits into from
Jul 29, 2019
Merged

chore: use the new any event function #6080

merged 3 commits into from
Jul 29, 2019

Conversation

brandonocasey
Copy link
Contributor

Description

Use the new any event function where it makes sense.

this.tech_.any(['sourceset', 'loadstart'], (e) => {
// if a sourceset happens before a `loadstart` there
// is nothing to do as this function will be called again.
if (e.type === 'sourceset') {
Copy link
Member

Choose a reason for hiding this comment

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

Using .any, I'm not sure that this function will get called again anymore.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think the comment needs to be updated to say that handleTechSourceset will be called again and reset the cache, rather than "this function"

Copy link
Member

Choose a reason for hiding this comment

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

Oh, I see, we called off unconditionally previously as well. It looked like we didn't.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I updated the comment now.

Copy link
Member

Choose a reason for hiding this comment

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

Thanks!

@gkatsev gkatsev added the patch This PR can be added to a patch release. label Jul 29, 2019
@gkatsev gkatsev merged commit 3c932c5 into master Jul 29, 2019
@gkatsev gkatsev deleted the chore/use-event-any branch July 29, 2019 21:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
confirmed patch This PR can be added to a patch release. tested
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants