Skip to content
This repository has been archived by the owner on Dec 13, 2020. It is now read-only.

Commit

Permalink
Make response object to array from patchRequest #1357
Browse files Browse the repository at this point in the history
  • Loading branch information
wiadev committed Nov 29, 2017
1 parent d8cf524 commit 8521f7f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/actions/WindowActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -472,13 +472,15 @@ export function patch(
viewId,
isEdit
}).then(response => {
let data = response.data instanceof Array ?
response.data : [response.data];
dispatch(mapDataToState(
response.data, isModal, rowId, id, windowType, isAdvanced
data, isModal, rowId, id, windowType, isAdvanced
));

dispatch(indicatorState('saved'));

return response.data;
return data;
}).catch(() => {
getData(
entity, windowType, id, tabId, rowId, null, null, isAdvanced,
Expand Down

0 comments on commit 8521f7f

Please sign in to comment.