From 0e5548660a4b7b6dad32e5650adaf43c3ed22dc3 Mon Sep 17 00:00:00 2001 From: Marco Falkenberg Date: Thu, 19 Dec 2024 15:58:28 +0100 Subject: [PATCH] Fix endless loop in polyfill of Element.contains() --- packages/polyfill/source/Node.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/polyfill/source/Node.ts b/packages/polyfill/source/Node.ts index af1a5705..2b275244 100644 --- a/packages/polyfill/source/Node.ts +++ b/packages/polyfill/source/Node.ts @@ -160,7 +160,7 @@ export class Node extends EventTarget { while (true) { if (currentNode == null) return false; if (currentNode === this) return true; - currentNode = node!.parentNode; + currentNode = currentNode!.parentNode; } } }