Skip to content

Comments

Unsubscribe from the channel when UpdatesForElement disconnects#299

Merged
marcoroth merged 1 commit intostimulusreflex:mainfrom
farolanf:fix-disconnected-callback-not-called
Nov 9, 2024
Merged

Unsubscribe from the channel when UpdatesForElement disconnects#299
marcoroth merged 1 commit intostimulusreflex:mainfrom
farolanf:fix-disconnected-callback-not-called

Conversation

@farolanf
Copy link
Contributor

Type of PR (feature, enhancement, bug fix, etc.)

Bug fix

Description

Unsubscribe from the channel by calling superclass's (SubscribingElement) disconnectedCallback.

Why should this be added

Fix repeated subscribe messages after a morph.

Checklist

  • My code follows the style guidelines of this project
  • Checks (StandardRB & Prettier-Standard) are passing

@netlify
Copy link

netlify bot commented Jul 22, 2024

Deploy Preview for cableready failed. Why did it fail? →

Name Link
🔨 Latest commit c2d3993
🔍 Latest deploy log https://app.netlify.com/sites/cableready/deploys/669e677527f01e0008bcf539

Copy link
Member

@marcoroth marcoroth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @farolanf, this makes sense to me!

I just wanted to hear if @julianrubisch has any objections.

@julianrubisch
Copy link
Contributor

I haven't tested it, but I guess it's harmless, and helps cleaning up connections.

@marcoroth marcoroth merged commit f758170 into stimulusreflex:main Nov 9, 2024
@marcoroth
Copy link
Member

Thank you @farolanf! 🙏🏼

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants