diff --git a/x-pack/legacy/plugins/painless_playground/public/components/editor.tsx b/x-pack/legacy/plugins/painless_playground/public/components/editor.tsx index bc5fabf4f309b..1a9ba18fa7dc0 100644 --- a/x-pack/legacy/plugins/painless_playground/public/components/editor.tsx +++ b/x-pack/legacy/plugins/painless_playground/public/components/editor.tsx @@ -21,7 +21,7 @@ export function Editor({ code, setCode, renderMainControls }: Props) { - {response.error || response.result ? ( + {response.error || typeof response.result !== 'undefined' ? ( diff --git a/x-pack/legacy/plugins/painless_playground/public/components/settings.tsx b/x-pack/legacy/plugins/painless_playground/public/components/settings.tsx index 654831fe138e4..8ea2c9929da29 100644 --- a/x-pack/legacy/plugins/painless_playground/public/components/settings.tsx +++ b/x-pack/legacy/plugins/painless_playground/public/components/settings.tsx @@ -79,7 +79,7 @@ export function Settings({
setContextSetup({ params: value })} options={{ diff --git a/x-pack/legacy/plugins/painless_playground/public/lib/helpers.ts b/x-pack/legacy/plugins/painless_playground/public/lib/helpers.ts index af288ea53b275..43edd08fd043e 100644 --- a/x-pack/legacy/plugins/painless_playground/public/lib/helpers.ts +++ b/x-pack/legacy/plugins/painless_playground/public/lib/helpers.ts @@ -30,7 +30,7 @@ export function buildRequestPayload( request.context = context; request.context_setup = { index: contextSetup.index, - document: parseJSON(contextSetup.doc), + document: parseJSON(contextSetup.document), }; return request; }