This repository was archived by the owner on Apr 12, 2024. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Interestingly,
option.value
will always be undefined, so this was a redundant.I wonder what the intenton was, though.
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.
@gkalpak I noticed the same thing. That's how I new this check would be safe to remove. My guess is it was intended to be
option.selectValue !== element.value
and the thought was that would prevent settingelement.value
if it didn't need to be. Strange thing about that though is that this function is only ever called from theaddOptionElement
function and it creates a new element cloned fromoptionTemplate
everytime . So, I don't thinkelement.value
will ever actually have a value prior to this line anyway. Makes me wonder if the check a few lines aboveoption.label !== element.label
is necessary.