diff --git a/packages/client/src/scripts/katex-macro.ts b/packages/client/src/scripts/katex-macro.ts index 4368095be..4c176b296 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);