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

clear() error for perspective-viewer #878

Closed
stevenvachon opened this issue Jan 21, 2020 · 1 comment · Fixed by #905
Closed

clear() error for perspective-viewer #878

stevenvachon opened this issue Jan 21, 2020 · 1 comment · Fixed by #905
Assignees
Labels
bug Concrete, reproducible bugs JS

Comments

@stevenvachon
Copy link

Bug Report

Steps to Reproduce:

const viewer = document.querySelector('perspective-viewer');

viewer.clear(); // throws
viewer.update([]);

Expected Result:

No error thrown.

Actual Result:

TypeError: Cannot read property 'clear' of undefined
    at HTMLElement.clear (some-file.js:1)

Probably caused by an inner this.table.clear() (or similar) when the table had not been instantiated.

Environment:

  • "@finos/perspective-viewer": "^0.4.0-rc.4"
  • Node.js v12.14.1
  • macOS 10.15.2
@texodus
Copy link
Member

texodus commented Jan 21, 2020

Yes, this is precisely right - clear() requires a an existing table. We should sanitize for these cases in perspective-viewer.

@texodus texodus self-assigned this Jan 21, 2020
@timkpaine timkpaine added bug Concrete, reproducible bugs JS labels Jan 27, 2020
texodus added a commit that referenced this issue Feb 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Concrete, reproducible bugs JS
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants