reiji-h 2 лет назад
Родитель
Сommit
4e437d7f90
1 измененных файлов с 3 добавлено и 2 удалено
  1. 3 2
      packages/presentation/src/components/Presentation.tsx

+ 3 - 2
packages/presentation/src/components/Presentation.tsx

@@ -42,7 +42,8 @@ export const Presentation = (props: PresentationProps): JSX.Element => {
   const { options, isEnabledMarp, children } = props;
   const { revealOptions } = options;
 
-  const marp = isEnabledMarp && parseSlideFrontmatterInMarkdown(children)[0];
+  const [marp] = parseSlideFrontmatterInMarkdown(children);
+  const hasMarpFlag = isEnabledMarp && marp;
 
   useEffect(() => {
     let deck: Reveal.Api;
@@ -63,7 +64,7 @@ export const Presentation = (props: PresentationProps): JSX.Element => {
 
   return (
     <div className={`grw-presentation ${styles['grw-presentation']} reveal`}>
-      <Slides options={options} hasMarpFlag={marp} presentation>{children}</Slides>
+      <Slides options={options} hasMarpFlag={hasMarpFlag} presentation>{children}</Slides>
     </div>
   );
 };