From 425553b678b7d015c605765a3d630bafe844830e Mon Sep 17 00:00:00 2001 From: "admin@duan-ya.com" Date: Thu, 19 Aug 2021 15:19:25 +0800 Subject: [PATCH] fix: ssr TypeError: Cannot read property 'indexOf' of undefined See this problem in issue: https://github.com/docsifyjs/docsify/issues/704 --- src/core/render/compiler.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/render/compiler.js b/src/core/render/compiler.js index 557507721..5841802e3 100644 --- a/src/core/render/compiler.js +++ b/src/core/render/compiler.js @@ -109,7 +109,7 @@ export class Compiler { return html; })(text); - const curFileName = this.router.parse().file; + const curFileName = this.router.parse(router.getCurrentPath()).file; if (isCached) { this.toc = this.cacheTOC[curFileName];