From f7bf4038dc7fcf3adc09697797da1c68c932eadc Mon Sep 17 00:00:00 2001
From: Jacky Zhao <j.zhao2k19@gmail.com>
Date: Thu, 06 Jul 2023 23:56:30 +0000
Subject: [PATCH] fix path parsing
---
quartz/plugins/transformers/description.ts | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/quartz/plugins/transformers/description.ts b/quartz/plugins/transformers/description.ts
index cc20769..3505b19 100644
--- a/quartz/plugins/transformers/description.ts
+++ b/quartz/plugins/transformers/description.ts
@@ -31,7 +31,9 @@
let sentenceIdx = 0
const len = opts.descriptionLength
while (finalDesc.length < len) {
- finalDesc += sentences[sentenceIdx] + '.'
+ const sentence = sentences[sentenceIdx]
+ if (!sentence) break
+ finalDesc += sentence + '.'
sentenceIdx++
}
--
Gitblit v1.10.0