From fea352849c6972da4b3b8935eb2e86f6cefc76ed Mon Sep 17 00:00:00 2001
From: Ben Schlegel <ben5.schlegel@gmail.com>
Date: Sat, 16 Sep 2023 17:45:21 +0000
Subject: [PATCH] fix: create deep copy of file passed into tree

---
 quartz/components/ExplorerNode.tsx |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/quartz/components/ExplorerNode.tsx b/quartz/components/ExplorerNode.tsx
index b8d8c14..e1c8b8e 100644
--- a/quartz/components/ExplorerNode.tsx
+++ b/quartz/components/ExplorerNode.tsx
@@ -32,7 +32,7 @@
   constructor(name: string, file?: QuartzPluginData, depth?: number) {
     this.children = []
     this.name = name
-    this.file = file ?? null
+    this.file = file ? structuredClone(file) : null
     this.depth = depth ?? 0
   }
 

--
Gitblit v1.10.0