Skip to content

Commit eef54d1

Browse files
committed
fix: check post valid only for written post
1 parent f7cb62e commit eef54d1

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/containers/write/ActiveEditor.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,9 @@ const ActiveEditor: React.FC<ActiveEditorProps> = () => {
132132
}, [dispatch, lastPostHistory, post]);
133133

134134
if (
135-
(!readPostForEdit.loading && post === null) ||
136-
(post && post.user.id !== userId)
135+
id &&
136+
((!readPostForEdit.loading && post === null) ||
137+
(post && post.user.id !== userId))
137138
) {
138139
return <NotFoundPage />;
139140
}

0 commit comments

Comments
 (0)