mirror of
https://github.com/appwrite/console.git
synced 2026-11-18 20:47:21 +00:00
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:
1 parent
79f2c43a96
commit
d5edccdb71
1 file changed
+4
-4
@@ -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>
|
||||
|
||||
|
||||
Reference in new issue
Block a user