From b064c889432c2b891dee8e983d8843fd6def6d61 Mon Sep 17 00:00:00 2001 From: Fedor Katurov Date: Wed, 13 Nov 2019 15:11:07 +0700 Subject: [PATCH] clear node only on goto, not on load --- src/redux/node/sagas.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/redux/node/sagas.ts b/src/redux/node/sagas.ts index c2a22b19..91f65661 100644 --- a/src/redux/node/sagas.ts +++ b/src/redux/node/sagas.ts @@ -94,13 +94,13 @@ function* onNodeGoto({ id, node_type }: ReturnType) { if (node_type) yield put(nodeSetCurrent({ ...EMPTY_NODE, type: node_type })); yield put(nodeLoadNode(id)); yield put(push(URLS.NODE_URL(id))); + yield put(nodeSetCommentData(0, { ...EMPTY_COMMENT })); + yield put(nodeSetRelated(null)); } function* onNodeLoad({ id, order = 'ASC' }: ReturnType) { yield put(nodeSetLoading(true)); yield put(nodeSetLoadingComments(true)); - yield put(nodeSetCommentData(0, { ...EMPTY_COMMENT })); - yield put(nodeSetRelated(null)); const { data: { node, error },