Преглед на файлове

Merge pull request #8040 from weseek/imprv/129384-129404-correct-update-message

imprv: Correct update message
Yuki Takei преди 2 години
родител
ревизия
0f28aaa451

+ 1 - 1
apps/app/src/client/services/AdminCustomizeContainer.js

@@ -216,7 +216,7 @@ export default class AdminCustomizeContainer extends Container {
         isEnabledStaleNotification: customizedParams.isEnabledStaleNotification,
         isEnabledStaleNotification: customizedParams.isEnabledStaleNotification,
         isAllReplyShown: customizedParams.isAllReplyShown,
         isAllReplyShown: customizedParams.isAllReplyShown,
         isSearchScopeChildrenAsDefault: customizedParams.isSearchScopeChildrenAsDefault,
         isSearchScopeChildrenAsDefault: customizedParams.isSearchScopeChildrenAsDefault,
-        isEnabledMarp: customizedParams.state.isEnabledMarp,
+        isEnabledMarp: customizedParams.isEnabledMarp,
       });
       });
     }
     }
     catch (err) {
     catch (err) {

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

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

+ 1 - 1
packages/presentation/src/services/growi-marpit.ts

@@ -60,4 +60,4 @@ export const presentationMarpit = new Marp({
   emoji: undefined,
   emoji: undefined,
   html: false,
   html: false,
   math: false,
   math: false,
-}).use(lineNumber);
+});