From 1cb49391f51968b68857066702da54a1b414765c Mon Sep 17 00:00:00 2001 From: Endi Date: Tue, 12 Nov 2019 16:15:25 +0700 Subject: [PATCH] Update packages/docusaurus-plugin-content-blog/src/blogUtils.ts Co-Authored-By: Alexey Pyltsyn --- packages/docusaurus-plugin-content-blog/src/blogUtils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/docusaurus-plugin-content-blog/src/blogUtils.ts b/packages/docusaurus-plugin-content-blog/src/blogUtils.ts index 83c2609a8d7d..870f7f007e57 100644 --- a/packages/docusaurus-plugin-content-blog/src/blogUtils.ts +++ b/packages/docusaurus-plugin-content-blog/src/blogUtils.ts @@ -7,7 +7,7 @@ import {parse, normalizeUrl} from '@docusaurus/utils'; import {LoadContext} from '@docusaurus/types'; export function truncate(fileString: string, truncateMarker: RegExp | string) { - return fileString.split(truncateMarker, 1).shift() || fileString; + return fileString.split(truncateMarker, 1).shift()!; } // YYYY-MM-DD-{name}.mdx?