Skip to content

Commit

Permalink
Fix issue when refreshed values contains a null key
Browse files Browse the repository at this point in the history
  • Loading branch information
eclarizio committed Sep 29, 2015
1 parent 50a38f2 commit 827a34d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions app/assets/javascripts/dialog_field_refresh.js
Expand Up @@ -46,8 +46,10 @@ var dialogFieldRefresh = {
var option = '<option ';
option += 'value="' + value[0] + '" ';
if (data.values.checked_value !== null) {
if (data.values.checked_value.toString() === value[0].toString()) {
option += 'selected="selected" ';
if (value[0] !== null) {
if (data.values.checked_value.toString() === value[0].toString()) {
option += 'selected="selected" ';
}
}
} else {
if (index === 0) {
Expand Down

0 comments on commit 827a34d

Please sign in to comment.