From 67cc6854b7dfa148660973cbc8d13c27b60ae020 Mon Sep 17 00:00:00 2001 From: Hetu Nandu Date: Tue, 21 Apr 2020 13:31:36 +0530 Subject: [PATCH] fix issue with not returning draft in data --- app/client/src/pages/Editor/APIEditor/index.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/client/src/pages/Editor/APIEditor/index.tsx b/app/client/src/pages/Editor/APIEditor/index.tsx index 4a092cb09a..7bd4b1bd31 100644 --- a/app/client/src/pages/Editor/APIEditor/index.tsx +++ b/app/client/src/pages/Editor/APIEditor/index.tsx @@ -221,8 +221,8 @@ const mapStateToProps = (state: AppState, props: any): ReduxStateProps => { const { drafts } = state.ui.apiPane; let data: RestAction | ActionData | RapidApiAction | undefined; - if (props.match.params.id in drafts) { - data = drafts[props.match.params.id]; + if (apiAction && apiAction.id in drafts) { + data = drafts[apiAction.id]; } else { data = apiAction; }