diff --git a/www/outputprocessors.php b/www/outputprocessors.php index d50a7dc2c..bb5ad2fd0 100644 --- a/www/outputprocessors.php +++ b/www/outputprocessors.php @@ -458,21 +458,25 @@ function DeleteSelectedProcessor() { } } - $(document).ready(function () { - $.ajax({ - url: "api/models?simple=true", - method: "GET", - dataType: "json", - success: function(models) { - models.unshift("<Use Start Channel>"); - SetupSelectableTableRow(tableInfo); - GetOutputProcessors(models); - }, - error: function() { - console.error("Error fetching models"); - } - }); + var models = []; + $(document).ready(function () { + $.ajax({ + url: "api/models?simple=true", + method: "GET", + dataType: "json", + success: function(data) { + data.unshift("<Use Start Channel>"); + models = data; + SetupSelectableTableRow(tableInfo); + GetOutputProcessors(models); + }, + error: function() { + models.unshift("<Use Start Channel>"); + SetupSelectableTableRow(tableInfo); + GetOutputProcessors(models); + } + }); if (window.innerWidth > 600) { $('#outputProcessorsBody').sortable({