CSCfi / CSCfi/ui

undefined _observer in c-table disconnectedCallback

Open
#240 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Vue
Stars
1
Forks
0
Avg merge
2h 56m
Merged PRs (30d)
31

Description

Happens rarely, but still happens.

The component throws in disconnectedCallback because _observer is not always initialized before teardown.

Affected version
@cscfi/csc-ui 3.0.19

Error
TypeError: Cannot read properties of undefined (reading 'disconnect')
at Lt.disconnectedCallback (c-table.tsx:114:20)

this._observer.disconnect();
without a null guard.
The same package appears to use null-safe teardown in other components (for example c-data-table uses optional chaining), so this looks inconsistent.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.