Skip to content

Commit 7ef6659

Browse files
committed
correct behaviour when using "" as an empty string
1 parent 455d7c3 commit 7ef6659

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

code/DropdownImageField.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public function Field($properties = array()) {
2626
$source = $this->getSource();
2727
$options = array();
2828
if($source) {
29-
if(is_object($source) && $this->emptyString) {
29+
if(is_object($source) && $this->hasEmptyDefault) {
3030
$options[] = new ArrayData(array(
3131
'Value' => '',
3232
'Title' => $this->emptyString,

javascript/ImageSelect.jquery.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@
152152
// _chosen: Object {chosen:Chosen}
153153
// Contains the current instance of Chosen class
154154
var lis = $(chosen.container).find('.chzn-drop ul li')
155-
var options = $(chosen.form_field).find('optgroup, option');
155+
var options = $(chosen.form_field).find('optgroup, option:not(:empty)');
156156

157157
for(var i = 0; i < lis.length; i++){
158158
var li = lis[i];

0 commit comments

Comments
 (0)