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

Tabulator: prevent JS error #6223

Merged
merged 1 commit into from
Jan 17, 2024
Merged

Tabulator: prevent JS error #6223

merged 1 commit into from
Jan 17, 2024

Conversation

maximlt
Copy link
Member

@maximlt maximlt commented Jan 17, 2024

I have a somewhat complex app with Tabulator widgets nested in an Accordion that started to raise Javascript errors related to Panel's tabulator code. The error is raised from the last condition of the second line because this.tabulator is undefined, setData being called from the callback triggered by this.model.source.properties.data.change.

setData(): void {
if (this._initializing || this._building || !this.tabulator.initialized)

It seems like this was the consequence of #5786. I haven't found what exactly can cause this.tabulator to be undefined in this context, so I'm just adding a guard in the this.model.source.properties.data.change callback and that seems to do the job.

@maximlt maximlt changed the title return early if tabulator is undefined Tabulator: prevent JS error Jan 17, 2024
Copy link

codecov bot commented Jan 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (6b6eb3f) 82.51% compared to head (5104e76) 84.03%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6223      +/-   ##
==========================================
+ Coverage   82.51%   84.03%   +1.51%     
==========================================
  Files         301      301              
  Lines       45099    45099              
==========================================
+ Hits        37214    37898     +684     
+ Misses       7885     7201     -684     
Flag Coverage Δ
ui-tests 40.70% <ø> (+2.23%) ⬆️
unitexamples-tests 71.66% <ø> (+0.04%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@philippjfr philippjfr merged commit c8f4e08 into main Jan 17, 2024
14 of 15 checks passed
@philippjfr philippjfr deleted the fix_tabulator_js_error branch January 17, 2024 22:05
@philippjfr philippjfr mentioned this pull request Jan 18, 2024
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.

None yet

2 participants