From c005fe440895c3533e6a263d8ad4c63df5a1ad2b Mon Sep 17 00:00:00 2001
From: Jacky Zhao <j.zhao2k19@gmail.com>
Date: Thu, 13 Mar 2025 05:31:44 +0000
Subject: [PATCH] fix(explorer): properly respect folderDefaultState (closes #1827)
---
quartz/util/path.ts | 7 ++-----
1 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/quartz/util/path.ts b/quartz/util/path.ts
index 580707f..8f85029 100644
--- a/quartz/util/path.ts
+++ b/quartz/util/path.ts
@@ -1,9 +1,6 @@
import { slug as slugAnchor } from "github-slugger"
import type { Element as HastElement } from "hast"
-import rfdc from "rfdc"
-
-export const clone = rfdc()
-
+import { clone } from "./clone"
// this file must be isomorphic so it can't use node libs (e.g. path)
export const QUARTZ = "quartz"
@@ -188,7 +185,7 @@
}
let joined = args
- .filter((segment) => segment !== "")
+ .filter((segment) => segment !== "" && segment !== "/")
.map((segment) => stripSlashes(segment))
.join("/")
--
Gitblit v1.10.0