Skip to content

Bug/CLARK-CLIENT-18/fix-typeerror-filter - #2289

Open
sentry[bot] wants to merge 1 commit into
mainfrom
seer/bug/clark-client-18/fix-typeerror-filter
Open

sentry[bot] wants to merge 1 commit into
mainfrom
seer/bug/clark-client-18/fix-typeerror-filter

Conversation

@sentry

@sentry sentry Bot commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

This PR addresses CLARK-CLIENT-18, a TypeError: Cannot read properties of undefined (reading 'filter') occurring in /onion/dashboard/.

Root Cause:
The getReleasedLearningObjects method in dashboard.component.ts was calling this.checkQueryParams$.next() synchronously before the asynchronous API call (this.searchService.getUsersLearningObjects) had completed and assigned data to this.releasedLearningObjects. This created a race condition where the route params subscription, triggered by checkQueryParams$, would attempt to call .filter on an undefined this.releasedLearningObjects.

Solution:
To resolve this, the this.checkQueryParams$.next() call has been moved inside the .then() callback of the getUsersLearningObjects promise. Additionally, await was added to the promise chain to ensure the execution pauses until the promise resolves. This guarantees that this.releasedLearningObjects is populated before checkQueryParams$ emits, preventing the TypeError.

Fixes CLARK-CLIENT-18

This PR was automatically generated by Sentry. You can adjust this setting at any time.

This branch has not been deployed

No deployments
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.

0 participants