Skip to content

Commit 9144b6d

Browse files
teach moveBeforeById to consider ctx.target as a potential id match.
1 parent e344311 commit 9144b6d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/idiomorph.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -548,7 +548,8 @@ var Idiomorph = (function () {
548548
const target =
549549
/** @type {Element} - will always be found */
550550
(
551-
ctx.target.querySelector(`[id="${id}"]`) ||
551+
(ctx.target.id === id && ctx.target) ||
552+
ctx.target.querySelector(`[id="${id}"]`) ||
552553
ctx.pantry.querySelector(`[id="${id}"]`)
553554
);
554555
removeElementFromAncestorsIdMaps(target, ctx);

0 commit comments

Comments
 (0)