mirror of
https://github.com/appwrite/console.git
synced 2026-11-18 20:47:21 +00:00
fix: can't add vars with same key name
This commit is contained in:
1 parent
694a8cff84
commit
a4611b78b8
1 file changed
+10
-1
@@ -22,7 +22,16 @@
|
||||
|
||||
function handleCreated(dispatchEvent: CustomEvent) {
|
||||
createFunction.update((n) => {
|
||||
n.vars.push(dispatchEvent.detail);
|
||||
if (n.vars.length) {
|
||||
n.vars.map((v) => {
|
||||
if (v.key !== dispatchEvent.detail.key) {
|
||||
n.vars.push(dispatchEvent.detail);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
n.vars.push(dispatchEvent.detail);
|
||||
}
|
||||
|
||||
return n;
|
||||
});
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user