From 671f6f93a0b6bd9aa2d9e494fa721b17d39155ff Mon Sep 17 00:00:00 2001 From: naskya Date: Sat, 1 Apr 2023 21:18:55 +0900 Subject: [PATCH] Fix a bug in macro expander --- packages/client/src/scripts/katex-macro.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/client/src/scripts/katex-macro.ts b/packages/client/src/scripts/katex-macro.ts index 4368095be4..4c176b2962 100644 --- a/packages/client/src/scripts/katex-macro.ts +++ b/packages/client/src/scripts/katex-macro.ts @@ -264,6 +264,8 @@ function expandKaTeXMacroOnce( } } + if (!macros.hasOwnProperty(macroName)) return [fallback, false]; + const numArgs: number = macros[macroName].args; const openBracket: string = macroName.slice(-1);