We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 99b90bf commit f771cc6Copy full SHA for f771cc6
ui/src/components/ApiAction.tsx
@@ -145,6 +145,8 @@ export default function ApiAction(props: Props) {
145
// do nothing
146
}
147
148
+ const wasDataWrapped = (data && data._lrd)
149
+
150
if (data && data._lrd && data._lrd.queries) {
151
const sqlQueries = data._lrd.queries.map((query: any) => {
152
return "Connection: "
@@ -174,12 +176,12 @@ export default function ApiAction(props: Props) {
174
176
})
175
177
178
if (isJson) {
- if (data?.data) {
179
+ if (wasDataWrapped && data?.data) {
180
setResponseData(JSON.stringify(data?.data, null, 2))
181
} else {
182
setResponseData(JSON.stringify(data, null, 2))
183
-
184
185
186
setResponseData(dataString)
187
0 commit comments