From ae1918c2ba3774600036275b0b88751d5d9b0ec2 Mon Sep 17 00:00:00 2001 From: EGOIST <0x142857@gmail.com> Date: Sun, 3 Nov 2019 22:02:15 +0800 Subject: [PATCH] fix: prevent content from being transformed twice --- packages/saber/src/Pages.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/saber/src/Pages.ts b/packages/saber/src/Pages.ts index 53055fb92..7195fb407 100644 --- a/packages/saber/src/Pages.ts +++ b/packages/saber/src/Pages.ts @@ -196,7 +196,7 @@ export class Pages extends Map { return page as Page } - fileToPage(file: FileInfo): Page { + fileToPage(file: FileInfo): CreatePageInput { const relativePath = slash(file.relative) const absolutePath = slash(file.absolute) const parsedFileName = FILE_NAME_REGEXP.exec( @@ -223,7 +223,7 @@ export class Pages extends Map { createdAt: parsedFileName[2] || file.birthtime, updatedAt: file.mtime } - return this.normalizePage(pageInput) + return pageInput } createPage(pageInput: CreatePageInput) {