Skip to content

Commit ba0a8f5

Browse files
author
Jason Croft
committed
Filter out projects that don't have snippets enabled.
1 parent 31d978e commit ba0a8f5

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

public/js/index.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1163,6 +1163,9 @@ ui.toolbar.export.snippet.click(function() {
11631163
return (a.path_with_namespace < b.path_with_namespace) ? -1 : ((a.path_with_namespace > b.path_with_namespace) ? 1 : 0);
11641164
});
11651165
data.projects.forEach(function(project) {
1166+
if (!project.snippets_enabled) {
1167+
return;
1168+
}
11661169
$('<option>').val(project.id).text(project.path_with_namespace).appendTo("#snippetExportModalProjects");
11671170
});
11681171
$("#snippetExportModalProjects").prop('disabled',false);

0 commit comments

Comments
 (0)