From 11817288d88745c57e22016dbd0aefc0d08bc06f Mon Sep 17 00:00:00 2001 From: Aymeric Mortemousque Date: Mon, 16 Dec 2024 09:01:38 +0100 Subject: [PATCH] Fix unobserve error for non-Element parameter --- .../rum-core/src/domain/view/viewMetrics/trackScrollMetrics.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/rum-core/src/domain/view/viewMetrics/trackScrollMetrics.ts b/packages/rum-core/src/domain/view/viewMetrics/trackScrollMetrics.ts index 11b70fde20..c6db1ceedf 100644 --- a/packages/rum-core/src/domain/view/viewMetrics/trackScrollMetrics.ts +++ b/packages/rum-core/src/domain/view/viewMetrics/trackScrollMetrics.ts @@ -111,7 +111,7 @@ export function createScrollValuesObservable( return () => { throttledNotify.cancel() - resizeObserver.unobserve(observerTarget) + resizeObserver.disconnect() eventListener.stop() } }