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

fix(geo): check catalog watcher befor destroy #1612

Open
wants to merge 1 commit into
base: next
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,9 @@ export class CatalogBrowserComponent implements OnInit, OnDestroy {
}

ngOnDestroy() {
this.watcher.destroy();
if (this.watcher) {
this.watcher.destroy();
}
Comment on lines +103 to +105
Copy link
Collaborator

@alecarn alecarn Jan 29, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

En regardant l'assignation du watcher dans le OnInit, je ne vois pas pourquoi le watcher pourrait être à undefined car il est synchrone. Ce n'est pas clair dans la documentation d'Angular si le OnDestroy peut court-circuter le OnInit.

Mais en regardant les breadcrumbs de Sentry, on voit qu'une autre erreur arrive avant celle-ci #1599. J'ai l'impression que cette dernière est la cause de l'erreur. Qu'est-ce que t'en pense?

}

/**
Expand Down
Loading