From 35f63763bc152a45f7eeedf4080382d7d27d5050 Mon Sep 17 00:00:00 2001 From: Ignacio Rivas Date: Mon, 29 Jul 2024 16:32:39 +0200 Subject: [PATCH] [Console] Fix split undefined error (#189200) --- .../editor/monaco/monaco_editor_actions_provider.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/plugins/console/public/application/containers/editor/monaco/monaco_editor_actions_provider.ts b/src/plugins/console/public/application/containers/editor/monaco/monaco_editor_actions_provider.ts index 88df785b8e044..6ed00d04837b8 100644 --- a/src/plugins/console/public/application/containers/editor/monaco/monaco_editor_actions_provider.ts +++ b/src/plugins/console/public/application/containers/editor/monaco/monaco_editor_actions_provider.ts @@ -371,8 +371,13 @@ export class MonacoEditorActionsProvider { return null; } - // if not on the 1st line of the request, suggest request body + // if the current request doesn't have a method, the request is not valid + // and shouldn't have an autocomplete type + if (!currentRequest.method) { + return null; + } + // if not on the 1st line of the request, suggest request body return AutocompleteType.BODY; }