From ab2c9f7a096de226d01ffddcf65016b81a5f0823 Mon Sep 17 00:00:00 2001 From: Josh Wooding <12938082+joshwooding@users.noreply.github.com> Date: Fri, 24 Jun 2022 22:27:35 -0400 Subject: [PATCH] Fix skipCsf support in compile functions --- src/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/index.ts b/src/index.ts index 74b0f56..3f5139b 100644 --- a/src/index.ts +++ b/src/index.ts @@ -2,9 +2,9 @@ import mdx from '@mdx-js/mdx'; import { createCompiler, MdxOptions } from './sb-mdx-plugin'; export const compile = async (code: string, options?: MdxOptions) => - mdx(code, { compilers: options?.skipCsf ? undefined : [createCompiler(options)] }); + mdx(code, { compilers: options?.skipCsf ? [] : [createCompiler(options)] }); export const compileSync = (code: string, options?: MdxOptions) => - mdx.sync(code, { compilers: options?.skipCsf ? undefined : [createCompiler(options)] }); + mdx.sync(code, { compilers: options?.skipCsf ? [] : [createCompiler(options)] }); export * from './sb-mdx-plugin';