From 581e8acf4bba46ddcdd5f9f4eb19021396815d1e Mon Sep 17 00:00:00 2001 From: koenvanwijk Date: Mon, 10 Oct 2022 20:34:27 +0200 Subject: [PATCH] fix: Connections can be highlighted multiple times (#6502) * fix: Connections can be highlighted multiple times * fix: remove spaces to fix clang-formating --- core/rendered_connection.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/rendered_connection.ts b/core/rendered_connection.ts index 933f18bb319..7330ff9da80 100644 --- a/core/rendered_connection.ts +++ b/core/rendered_connection.ts @@ -280,6 +280,10 @@ export class RenderedConnection extends Connection { /** Add highlighting around this connection. */ highlight() { + if (this.highlightPath) { + // This connection is already highlighted + return; + } let steps; const sourceBlockSvg = (this.sourceBlock_); const renderConstants =