Skip to content

Commit cd9f56f

Browse files
author
Sebastian Flick
committed
fix devilstables popups
1 parent 29cabea commit cd9f56f

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/routes/Detail.svelte

+8-2
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,10 @@
174174
})
175175
.on('click', (e) => {
176176
const reference = e.currentTarget;
177-
const popup = popupLabels[reference.textContent];
177+
const popup =
178+
popupLabels[
179+
codices.find((i) => i.sigil === reference.textContent)?.handle || reference.textContent
180+
];
178181
if (popup && reference) {
179182
computePosition(reference, popup, {
180183
placement: 'top'
@@ -189,7 +192,10 @@
189192
})
190193
.on('blur', (e) => {
191194
const reference = e.currentTarget;
192-
const popup = popupLabels[reference.textContent];
195+
const popup =
196+
popupLabels[
197+
codices.find((i) => i.sigil === reference.textContent)?.handle || reference.textContent
198+
];
193199
if (popup) {
194200
popup.style.opacity = '0';
195201
}

0 commit comments

Comments
 (0)