fix issue with pending event trigger logs when opened (#926)

This commit is contained in:
Karthik Venkateswaran 2018-10-29 23:42:22 +05:30 committed by Shahidh K Muhammed
parent a1febadf47
commit b84a03fc38
2 changed files with 14 additions and 6 deletions

View File

@ -322,8 +322,10 @@ const ViewRows = ({
null,
4
);
const finalResponse = JSON.parse(
JSON.stringify(finalRow.response, null, 4)
const finalResponse = JSON.stringify(
finalRow.response,
null,
4
);
return (
<div style={{ padding: '20px' }}>

View File

@ -144,6 +144,9 @@ class RedeliverEvent extends Component {
finalResponse = JSON.stringify(finalResponse, null, 4);
} catch (e) {
console.error(e);
if (typeof finalResponse === 'object') {
finalResponse = JSON.stringify(finalResponse, null, 4);
}
}
return (
<div style={{ padding: '20px' }}>
@ -187,6 +190,9 @@ class RedeliverEvent extends Component {
latestResponse = log.eventInvocations[0]
? log.eventInvocations[0].response
: '';
if (typeof latestResponse === 'object') {
latestResponse = JSON.stringify(latestResponse, null, 4);
}
}
return (
@ -221,10 +227,10 @@ class RedeliverEvent extends Component {
value={
log.eventInvocations[0]
? JSON.stringify(
log.eventInvocations[0].request,
null,
4
)
log.eventInvocations[0].request,
null,
4
)
: ''
}
minLines={8}