Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use declare readonly to avoid overriding the existing Stimulus property #13

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

pinzonjulian
Copy link

@pinzonjulian pinzonjulian commented Jun 11, 2024

This change follows the advice from the Stimulus reference to make sure the property that stimulus creates is not overwritten.

I found this to be an issue when I encountered the following error:

TypeError: this.turboStreamsTargets is not iterable

This was working just fine before but became an issue after we started upgrading some packages in our company. I haven't been able to pinpoint exactly what caused the issue though. I should also note, I'm not using this gem or package directly, I just copied the controller to our codebase but thought I opened this PR to help out.

@pinzonjulian pinzonjulian changed the title Use declare keyword avoids to avoid overriding the existing Stimulus property Use declare readonly to avoid overriding the existing Stimulus property Jun 11, 2024
@seanpdoyle
Copy link
Owner

@pinzonjulian thank you for opening this PR. I'm sorry that it has sat unacknowledged for as long as it has.

I've restored CI to a passing state. Could you rebase this branch off of main?

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.

2 participants