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

undefined no more #106

Merged
merged 1 commit into from
Feb 6, 2021
Merged

Conversation

leastbad
Copy link
Contributor

@leastbad leastbad commented Feb 1, 2021

Many operations will place the word undefined instead of an empty string if the critial parameter is omitted.

  1. Nobody is looking for a way to emit undefined. This is not a feature.
  2. There are many examples of operations where not specifying the critical parameter could be a feature if used creatively. For example, this PR would make it possible to:
cable_ready.inner_html(selector: "#foo")

This would erase the contents of the element.

Admittedly, I have already done this to the set_value operation before I realized that >50% of the operations would be better-suited to an empty string default.

@leastbad leastbad merged commit 9e3fc15 into stimulusreflex:master Feb 6, 2021
@leastbad leastbad deleted the no_more_undefined branch February 6, 2021 00:02
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.

None yet

2 participants