|
|
@@ -200,9 +200,9 @@ export const PageEditor = React.memo((props: Props): JSX.Element => {
|
|
|
}, [socket, checkIsConflict]);
|
|
|
|
|
|
const save = useCallback(async(opts?: {slackChannels: string, overwriteScopesOfDescendants?: boolean}): Promise<IPageHasId | null> => {
|
|
|
- if (pageId == null || currentPagePath == null || currentRevisionId == null || grantData == null) {
|
|
|
+ if (pageId == null || currentRevisionId == null || grantData == null) {
|
|
|
logger.error('Some materials to save are invalid', {
|
|
|
- pageId, currentPagePath, currentRevisionId, grantData,
|
|
|
+ pageId, currentRevisionId, grantData,
|
|
|
});
|
|
|
throw new Error('Some materials to save are invalid');
|
|
|
}
|
|
|
@@ -242,7 +242,7 @@ export const PageEditor = React.memo((props: Props): JSX.Element => {
|
|
|
}
|
|
|
|
|
|
// eslint-disable-next-line max-len
|
|
|
- }, [codeMirrorEditor, grantData, pageId, currentPagePath, currentRevisionId, mutateWaitingSaveProcessing, mutateRemotePageId, mutateRemoteRevisionId, mutateRemoteRevisionLastUpdatedAt, mutateRemoteRevisionLastUpdateUser]);
|
|
|
+ }, [codeMirrorEditor, grantData, pageId, currentRevisionId, mutateWaitingSaveProcessing, mutateRemotePageId, mutateRemoteRevisionId, mutateRemoteRevisionLastUpdatedAt, mutateRemoteRevisionLastUpdateUser]);
|
|
|
|
|
|
const saveAndReturnToViewHandler = useCallback(async(opts: {slackChannels: string, overwriteScopesOfDescendants?: boolean}) => {
|
|
|
const page = await save(opts);
|