fix: Avoid filter payload changing to null on load more conversations (#3926)

Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
Co-authored-by: Nithin David Thomas <1277421+nithindavid@users.noreply.github.com>
This commit is contained in:
Fayaz Ahmed 2022-02-07 22:14:21 +05:30 committed by GitHub
parent 4c0f6c1333
commit 375d943a48
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 21 additions and 4 deletions

View file

@ -1,5 +1,6 @@
const generatePayload = data => {
let payload = data.map(item => {
const actions = JSON.parse(JSON.stringify(data));
let payload = actions.map(item => {
if (Array.isArray(item.action_params)) {
item.action_params = item.action_params.map(val => val.id);
} else if (typeof item.values === 'object') {