From cd17e4631423221bf989143be9f724e71407aa1c Mon Sep 17 00:00:00 2001 From: Just van Rossum Date: Sun, 17 Sep 2023 07:47:24 +0200 Subject: [PATCH] simplify cell construction: remove unneeded div --- .../editor/panel-designspace-navigation.js | 25 +++++++------------ 1 file changed, 9 insertions(+), 16 deletions(-) diff --git a/src/fontra/views/editor/panel-designspace-navigation.js b/src/fontra/views/editor/panel-designspace-navigation.js index d47c9cd18..5058922be 100644 --- a/src/fontra/views/editor/panel-designspace-navigation.js +++ b/src/fontra/views/editor/panel-designspace-navigation.js @@ -912,24 +912,17 @@ function makeIconCellFactory(iconPaths, triggerOnDoubleClick = false) { } function interpolationErrorCell(item, colDesc) { - const iconElement = html.createDomElement("inline-svg", { - src: "/tabler-icons/bug.svg", - }); return item[colDesc.key] - ? html.div( - { - style: "width: 1.2em; height: 1.2em; color: #F36;", - onclick: (event) => { - event.stopImmediatePropagation(); - dialog( - "The source has an interpolation incompatibility", - item[colDesc.key], - [{ title: "Okay" }] - ); - }, + ? html.createDomElement("inline-svg", { + src: "/tabler-icons/bug.svg", + style: "width: 1.2em; height: 1.2em; color: #F36;", + onclick: (event) => { + event.stopImmediatePropagation(); + dialog("The source has an interpolation incompatibility", item[colDesc.key], [ + { title: "Okay" }, + ]); }, - [iconElement] - ) + }) : ""; }