File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
packages/signals/signals/src/core/signal-generators/dom-gen Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -184,10 +184,13 @@ export class MutationObservable {
184184 private experimentalOnChangeAdapter = new ExperimentalOnChangeEventAdapter ( )
185185
186186 private observeElementAttributes (
187- element : HTMLElement ,
187+ element : Element ,
188188 attributes : string [ ] ,
189189 emitter : ElementChangedEmitter
190190 ) {
191+ if ( ! ( element instanceof HTMLElement ) ) {
192+ return
193+ }
191194 const _emitAttributeMutationEvent = ( attributes : AttributeMutations ) => {
192195 emitter . emit ( 'attributeChanged' , {
193196 element,
@@ -295,7 +298,7 @@ export class MutationObservable {
295298 }
296299 logger . debug ( 'Observing element' , element )
297300 this . observeElementAttributes (
298- element as HTMLElement ,
301+ element ,
299302 this . settings . observedAttributes ,
300303 emitter
301304 )
You can’t perform that action at this time.
0 commit comments