-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
[BUGFIX release] Default {{each}} key to @guid or @item based on type. #11461
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not just typeof?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, lets just use JS typeof here
|
Looks good 👍 |
|
yay 👍 |
|
Update:
|
|
I am +1. I've also heard many WAT about the current behavior |
df1d4bb to
d2094bb
Compare
|
Updated (hopefully for the last time) to deprecate |
|
FYI: It seems that this commit didn't get into the 1.13.1 tag |
|
Thanks!! ⛵ |
This PR uses
@itemas the key when the item being iterated is a string or number, and uses@guidwhen it is anything else.This is an attempt at making a better default, to prevent users from having to specify a
key=to each{{each}}invocation.It is absolutely possible, that we will want to revisit this and make specifying
keyrequired in the future, but it seems that we should attempt at good defaults before making that decision.