Skip to content

changed existing selected_values check to use value instead of value/label #59

Open
wants to merge 1 commit into from

1 participant

@clarkewd

I don't see a reason to use the label instead of the value:

selected_values.push($(this).val() + "-" + $(this).text());

Why not just use:

selected_values.push($(this).val())

I was having trouble with returned JSON and encoded HTML entities not matching the label that was pulled from the page using .text() - sure it is possible to also use .html() but why not forget about the labels and check for duplicates / existing based on the selected value and not the label? the part of the code that was changed is not used when displaying the dropdown, etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.