Explorar el Código

fix: clone directive object when adding to ngxDirectives

Jacky hace 1 mes
padre
commit
f637e61db2

+ 1 - 1
app/src/components/NgxConfigEditor/directive/DirectiveEditor.vue

@@ -22,7 +22,7 @@ onMounted(() => {
 })
 
 function addDirective(directive: NgxDirective) {
-  ngxDirectives.value.push(directive)
+  ngxDirectives.value.push({ ...directive })
 }
 
 function removeDirective(index: number) {