Skip to content

Commit a7a88ea

Browse files
committed
Fix edge case in outputprocessor UI
1 parent 229cdb4 commit a7a88ea

File tree

1 file changed

+18
-14
lines changed

1 file changed

+18
-14
lines changed

www/outputprocessors.php

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -458,21 +458,25 @@ function DeleteSelectedProcessor() {
458458
}
459459
}
460460

461-
$(document).ready(function () {
462-
$.ajax({
463-
url: "api/models?simple=true",
464-
method: "GET",
465-
dataType: "json",
466-
success: function(models) {
467-
models.unshift("<Use Start Channel>");
468-
SetupSelectableTableRow(tableInfo);
469-
GetOutputProcessors(models);
470-
},
471-
error: function() {
472-
console.error("Error fetching models");
473-
}
474-
});
461+
var models = [];
475462

463+
$(document).ready(function () {
464+
$.ajax({
465+
url: "api/models?simple=true",
466+
method: "GET",
467+
dataType: "json",
468+
success: function(data) {
469+
data.unshift("<Use Start Channel>");
470+
models = data;
471+
SetupSelectableTableRow(tableInfo);
472+
GetOutputProcessors(models);
473+
},
474+
error: function() {
475+
models.unshift("<Use Start Channel>");
476+
SetupSelectableTableRow(tableInfo);
477+
GetOutputProcessors(models);
478+
}
479+
});
476480

477481
if (window.innerWidth > 600) {
478482
$('#outputProcessorsBody').sortable({

0 commit comments

Comments
 (0)