silverstripe-dependentdropdownfield
silverstripe-dependentdropdownfield copied to clipboard
Duplicate empty string values in dropdown

This seems to be caused by DropdownField::Field() adding the empty value after DependentDropdownField::getSource() adds it to the actual source array.
https://github.com/sheadawson/silverstripe-dependentdropdownfield/blob/108adf37a360dab5b2139b98b2840834513da469/code/DependentDropdownField.php#L86-L90
Changing these lines to return $source seems to fix the problem.