File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11<script setup lang="ts">
22import type { AccessPermission } from ' #cli/types'
33import { buildScopeTeam } from ' ~/utils/npm/common'
4+ import { packageRoute } from ' ~/utils/router'
45
56const props = defineProps <{
67 orgName: string
Original file line number Diff line number Diff line change @@ -34,6 +34,7 @@ const dialogRef = useTemplateRef('dialogRef')
3434
3535// Load teams when modal opens
3636async function loadTeams() {
37+ teams .value = []
3738 if (! isConnected .value ) return
3839
3940 isLoadingTeams .value = true
@@ -47,6 +48,8 @@ async function loadTeams() {
4748 } else {
4849 loadError .value = connectorError .value || ' Failed to load teams'
4950 }
51+ } catch (err ) {
52+ loadError .value = err instanceof Error ? err .message : ' Failed to load teams'
5053 } finally {
5154 isLoadingTeams .value = false
5255 }
Original file line number Diff line number Diff line change @@ -60,16 +60,21 @@ const teamCollaborators = computed(() => {
6060async function loadCollaborators() {
6161 if (! isConnected .value || ! sourcePackage .value ) return
6262
63+ const requestedSource = sourcePackage .value
6364 isLoadingCollaborators .value = true
6465 loadError .value = null
6566
6667 try {
67- const result = await listPackageCollaborators (sourcePackage .value )
68+ const result = await listPackageCollaborators (requestedSource )
69+ if (sourcePackage .value !== requestedSource ) return
70+
6871 if (result ) {
6972 collaborators .value = result
7073 } else {
7174 loadError .value = connectorError .value || ' Failed to load collaborators'
7275 }
76+ } catch (err ) {
77+ loadError .value = err instanceof Error ? err .message : ' Failed to load collaborators'
7378 } finally {
7479 isLoadingCollaborators .value = false
7580 }
You can’t perform that action at this time.
0 commit comments