fix(client): guard syncRepository against cleared selectedRepo after await - #2603
Draft
shikanime wants to merge 1 commit into
Draft
fix(client): guard syncRepository against cleared selectedRepo after await#2603shikanime wants to merge 1 commit into
shikanime wants to merge 1 commit into
Conversation
…await Signed-off-by: William Phetsinorath <william.phetsinorath-open@interieur.gouv.fr> Change-Id: I6faf7012b6113dbdadf4f952023c73a46a6a6964
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

0 New Issues
0 Fixed Issues
0 Accepted Issues
No data about coverage (51.40% Estimated after merge)
Contexte
Le snackbar affichait
can't access property "internalRepoName", h.value is undefinedau lancement d'une synchronisation de dépôt.Issues liées : #2602
Refs: #2602
Cause
syncRepository()accédait àselectedRepo.value.internalRepoNameaprès l'await deRepositories.sync(...). La fermeture de la modale pendant l'appel (save / delete / reload) videselectedRepo, rendant la lectureundefinedet produisant le TypeError capturé en snackbar.Correction
Fige
const repo = selectedRepo.valueavant l'await et l'utilise pour.idet.internalRepoName. Une seule lecture avant l'appel asynchrone, aucun accès post-await sur une référence volatile.Fichier
apps/client/src/components/ProjectResources.vue —
syncRepository()