From 011ebc82d0c0dd54c4ffe24c137806613e857632 Mon Sep 17 00:00:00 2001 From: Dev Catalin <20538711+devcatalin@users.noreply.github.com> Date: Wed, 21 Jun 2023 14:27:33 +0300 Subject: [PATCH] chore: quick fix --- src/editor/editor.instance.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/editor/editor.instance.ts b/src/editor/editor.instance.ts index 3208d7116a..f73ae2c834 100644 --- a/src/editor/editor.instance.ts +++ b/src/editor/editor.instance.ts @@ -85,6 +85,8 @@ export function recreateEditorModel(editor: monaco.editor.ICodeEditor, text: str const kindMatch = text.match(/kind:\s*(\w+)/); if (kindMatch?.length === 1) { currentResourceKind = kindMatch[1]; + } else { + currentResourceKind = undefined; } isRecreatingModel = true; @@ -178,7 +180,6 @@ export const clearEditorDecorations = () => { monaco.languages.registerHoverProvider('yaml', { provideHover: (model, position) => { - // We're sending this event on any hover because this method might be triggered by a hover created by Monaco itself const positionHovers = editorHovers.filter(hover => isPositionInRange(position, hover.range)); if (positionHovers.length === 0) { trackEvent('editor/hover', {resourceKind: currentResourceKind});