Browse Source

fix: clone directive object when adding to ngxDirectives

Jacky 3 weeks ago
parent
commit
f637e61db2
1 changed files with 1 additions and 1 deletions
  1. 1 1
      app/src/components/NgxConfigEditor/directive/DirectiveEditor.vue

+ 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) {