Unreachable Code in _setMenuHeight
matthew-hodgins opened this issue · comments
What is the current behavior?
There appears to be unreachable code in jquery.multiselect.js:1222 in _setMenuHeight. In the if statement below, useSelectSize must evaluate to true to enter the block but then setting the ulHeight is only performed if useSelectSize evaluates to false (which will never happen).
if (useSelectSize && ++itemCount >= elSelectSize || ulHeight > maxHeight) {
overflowSetting = 'auto';
if (!useSelectSize) {
ulHeight = maxHeight;
}
return false;
}
What is the expected behavior?
Unreachable code should be removed.
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo
Common options for demos are jsfiddle and codepen
If you are requesting a new or changed feature, please provide a rationale
Will you submit a corresponding Pull Request to fix the bug or implement the feature?
Please tell us about your setup
- Version: V3
- Browser: Edge on Mac OS
- Other frameworks in use:
- File version: 9c3b165
Closing - user error. I can't figure out why my menu height is always set to 70 unless I refresh the multiselect in the open event, but this is not the cause.
For anyone watching, my issue was resolved by pulling latest and ignoring the released V3 code.