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/Explorer.tsx | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/quartz/components/Explorer.tsx b/quartz/components/Explorer.tsx
index efc9f6a..23c5db2 100644
--- a/quartz/components/Explorer.tsx
+++ b/quartz/components/Explorer.tsx
@@ -40,6 +40,11 @@
fileTree.filter(opts.filterFn)
}
+ // If provided, apply map function to fileTree
+ if (opts.mapFn) {
+ fileTree.map(opts.mapFn)
+ }
+
// Get all folders of tree. Initialize with collapsed state
const folders = fileTree.getFolderPaths(opts.folderDefaultState === "collapsed")
--
Gitblit v1.10.0