From 60cdecf82a27952e3d1dc4a35a3333934f8a87be Mon Sep 17 00:00:00 2001 From: Seth Silesky <5115498+silesky@users.noreply.github.com> Date: Tue, 17 Dec 2024 17:28:56 -0600 Subject: [PATCH] wip --- .../src/core/signal-generators/dom-gen/mutation-observer.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/signals/signals/src/core/signal-generators/dom-gen/mutation-observer.ts b/packages/signals/signals/src/core/signal-generators/dom-gen/mutation-observer.ts index 391fa83f9..43e7984e3 100644 --- a/packages/signals/signals/src/core/signal-generators/dom-gen/mutation-observer.ts +++ b/packages/signals/signals/src/core/signal-generators/dom-gen/mutation-observer.ts @@ -206,7 +206,7 @@ export class MutationObservable { const shouldDebounceElement = shouldDebounce(element) - const _emitAttributeMutationEventDebounced = shouldDebounceElement + const _emitMaybeDebouncedEvent = shouldDebounceElement ? debounceWithKey( emit, // debounce based on the attribute names, so that we can debounce all changes to a single attribute. e.g if attribute "value" changes, that gets debounced, but if another attribute changes, that gets debounced separately @@ -267,7 +267,7 @@ export class MutationObservable { ...mutations, }) - _emitAttributeMutationEventDebounced(mutations) + _emitMaybeDebouncedEvent(mutations) } const observer = new MutationObserver(cb)