From bcc72af80dc6401fc84e98693425c2283c26cbe4 Mon Sep 17 00:00:00 2001 From: Kari Lavikka Date: Fri, 4 Oct 2024 13:28:05 +0300 Subject: [PATCH] fix: subclone hover when subclones are integers, not strings --- src/interactions.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/interactions.ts b/src/interactions.ts index 9e91f45..397a2b5 100644 --- a/src/interactions.ts +++ b/src/interactions.ts @@ -78,7 +78,11 @@ function isTentacle(elem: SVGElement) { function getSubclones(dataset: DOMStringMap): Set { if (dataset.descendantSubclones) { - return new Set(JSON.parse(dataset.descendantSubclones)); + return new Set( + JSON.parse(dataset.descendantSubclones).map( + (subclone: string | number) => `${subclone}` + ) + ); } else if (dataset.subclone != null) { return new Set([dataset.subclone]); }