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

filterEmptyBuckets breaks reloadSymbolData #2244

Closed
ansis opened this issue Mar 10, 2016 · 2 comments · Fixed by #2246
Closed

filterEmptyBuckets breaks reloadSymbolData #2244

ansis opened this issue Mar 10, 2016 · 2 comments · Fixed by #2246
Assignees
Labels

Comments

@ansis
Copy link
Contributor

ansis commented Mar 10, 2016

buckets = filterEmptyBuckets(buckets);

oldBucket.destroy(painter.gl);

oldBucket is undefined if the bucket used to be empty and was filtered out by filterEmptyBuckets. Trying to call destroy on undefined will error.

If a bucket is filtered out in the current set of results but was present in the last one, it won't get removed from this.buckets and we will render stale symbols.

cc @lucaswoj

@ansis ansis added the bug 🐞 label Mar 10, 2016
@lucaswoj
Copy link
Contributor

My fault. I even left this helpful comment. 😬

// TODO rewrite this

@lucaswoj
Copy link
Contributor

I'm not sure how to trigger an error using this fault. Can you make a demo using this jsbin @ansis? http://jsbin.com/kavitapesi/1/edit?html,output

lucaswoj pushed a commit that referenced this issue Mar 11, 2016
@lucaswoj lucaswoj self-assigned this Mar 11, 2016
lucaswoj pushed a commit that referenced this issue Mar 14, 2016
lucaswoj pushed a commit that referenced this issue Mar 14, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants