fix: unsafe mutations.

More info: Mutations are fine in normal `async/awaits` but not allowed on functions that are called from svelte context using `{#await}` on Svelte5 afaik. They can, however be updated from other async functions inside the one that is called, like we did here in this commit for `$repositories` updates.
This commit is contained in:
Darshan committed 2025-05-13 09:39:01 +05:30
1 parent 79f2c43a96
commit d5edccdb71
1 file changed
+4 -4
+4 -4
View File
@@ -42,7 +42,7 @@
} = $props();
let search = $state('');
let selectedInstallation = $state(null);
let selectedInstallation = null;
async function loadInstallations() {
if (installationList) {
@@ -76,9 +76,6 @@
await fetchRepos(installationId, search);
}
$repositories.search = search;
$repositories.installationId = installationId;
if ($repositories.repositories.length && action === 'select') {
selectedRepository = $repositories.repositories[0].id;
$repository = $repositories.repositories[0];
@@ -108,6 +105,9 @@
)) as unknown as Models.ProviderRepositoryFrameworkList
).frameworkProviderRepositories;
}
$repositories.search = search;
$repositories.installationId = installationId;
}
</script>