Skip to content

Commit 9bd7b1c

Browse files
committed
more checks
1 parent f5f63c3 commit 9bd7b1c

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

lib/server/docs.plugin.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ class DocsPlugin {
5050
const bar = progress.defaultBar();
5151
bar.start(this.docs.length, 0, { prefix: 'rendering images', suffix: '-' });
5252
for (const doc of this.docs) {
53-
if (!doc?.metadata.permalink) {
53+
console.log("doc", doc);
54+
if (!doc.metadata.permalink || !doc.metadata.permalink.length) {
5455
continue;
5556
}
5657
const document = new document_1.Document(this.getHtmlPath(doc));

src/server/docs.plugin.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ export class DocsPlugin {
6969
bar.start(this.docs.length, 0, {prefix: 'rendering images', suffix: '-'})
7070
for (const doc of this.docs) {
7171
console.log("doc", doc)
72-
if (!doc?.metadata.permalink) {
72+
if (!doc.metadata.permalink || !doc.metadata.permalink.length) {
7373
continue;
7474
}
7575
const document = new Document(this.getHtmlPath(doc)!)

0 commit comments

Comments
 (0)