Skip to content

Commit d7c538d

Browse files
committed
Substitute ternary operator by safe navigation
1 parent 4536e8d commit d7c538d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/views/isa_studies/_study_table.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141

4242
function createSampleTypeOptions(types){
4343
$j("#options_container").append('<div id="checkbox_group" class="btn-group" data-toggle="buttons"></div>')
44-
let studyTitle = '<%= study&.title.nil? ? 'Study' : study&.title %>';
44+
let studyTitle = '<%= study&.title || 'Study' %>';
4545
let sourceSampleType = types[0];
4646
let sampleSampleType = types[1];
4747
let source_elem = `<label class="btn btn-default active sp-btn-variant-0"><input id="checkbox-${sourceSampleType.id}" type="checkbox" checked onchange="toggleSampleType(${sourceSampleType.id}, $j(this))" />${studyTitle} - sources</label>`;

0 commit comments

Comments
 (0)