mirror of
https://github.com/appwrite/console.git
synced 2026-11-18 20:47:21 +00:00
fix: small stuff
This commit is contained in:
1 parent
915203e6d9
commit
2604d6950d
1 file changed
+7
-4
@@ -52,8 +52,9 @@
|
||||
let activeDeployment: Models.Deployment = null;
|
||||
|
||||
async function getActiveDeployment() {
|
||||
if (!$func?.deployment) return null;
|
||||
const list = await sdk.forProject.functions.listDeployments($page.params.function, [
|
||||
Query.equal('$id', $func?.deployment)
|
||||
Query.equal('$id', $func.deployment)
|
||||
]);
|
||||
return list?.deployments?.[0];
|
||||
}
|
||||
@@ -64,13 +65,15 @@
|
||||
|
||||
deploymentList.subscribe((list: Models.DeploymentList | null) => {
|
||||
if (list?.deployments) {
|
||||
let active = list.deployments.find((deployment) => deployment.$id === $func.deployment);
|
||||
if (!active) {
|
||||
let activeDep = list.deployments.find(
|
||||
(deployment) => deployment.$id === $func.deployment
|
||||
);
|
||||
if (!activeDep) {
|
||||
getActiveDeployment().then((deployment) => {
|
||||
activeDeployment = deployment;
|
||||
});
|
||||
} else {
|
||||
activeDeployment = active;
|
||||
activeDeployment = activeDep;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user