jam411 3 лет назад
Родитель
Сommit
0e4685c61d

+ 1 - 1
packages/app/src/client/services/page-operation.ts

@@ -2,9 +2,9 @@ import { SubscriptionStatusType, Nullable } from '@growi/core';
 import urljoin from 'url-join';
 
 import { OptionsToSave } from '~/interfaces/editor-settings';
+import { useEditingMarkdown } from '~/stores/context';
 import loggerFactory from '~/utils/logger';
 
-
 import { toastError } from '../util/apiNotification';
 import { apiPost } from '../util/apiv1-client';
 import { apiv3Post, apiv3Put } from '../util/apiv3-client';

+ 1 - 1
packages/app/src/components/PageEditor.tsx

@@ -116,7 +116,7 @@ const PageEditor = React.memo((): JSX.Element => {
     try {
       await saveOrUpdate(optionsToSave, { pageId, path: currentPagePath || currentPathname, revisionId: currentRevisionId }, markdownToSave.current);
       await mutateCurrentPage();
-      await mutateEditingMarkdown(markdownToSave.current);
+      mutateEditingMarkdown(markdownToSave.current);
       mutateIsEnabledUnsavedWarning(false);
       return true;
     }

+ 1 - 1
packages/app/src/stores/context.tsx

@@ -1,6 +1,6 @@
 import { IUser } from '@growi/core';
 import { HtmlElementNode } from 'rehype-toc';
-import { Key, SWRResponse } from 'swr';
+import { Key, mutate, SWRResponse } from 'swr';
 import useSWRImmutable from 'swr/immutable';