diff --git a/octoprint_enclosure/static/js/enclosure.js b/octoprint_enclosure/static/js/enclosure.js index 5022a66..98217f2 100644 --- a/octoprint_enclosure/static/js/enclosure.js +++ b/octoprint_enclosure/static/js/enclosure.js @@ -58,13 +58,15 @@ $(function () { self.isRegularOutput = function(index_id){ return_value = false; - self.settingsViewModel.settings.plugins.enclosure.rpi_outputs().forEach(function (output) { - if (output.index_id() == index_id && output.output_type() == "regular") { - return_value = true; - return false; - } - }); - return return_value; + if (typeof index_id != 'undefined'){ + self.settingsViewModel.settings.plugins.enclosure.rpi_outputs().forEach(function (output) { + if (output.index_id() == index_id && output.output_type() == "regular") { + return_value = true; + return false; + } + }); + } + return return_value; }; self.linkedTemperatureControl = function(sensor_index){ diff --git a/octoprint_enclosure/templates/enclosure_settings.jinja2 b/octoprint_enclosure/templates/enclosure_settings.jinja2 index 233c29c..732a9a2 100644 --- a/octoprint_enclosure/templates/enclosure_settings.jinja2 +++ b/octoprint_enclosure/templates/enclosure_settings.jinja2 @@ -96,7 +96,7 @@ {{ _('Link PWM to Temperature') }} Link PWM ouput to temperature. PWM output will be interpolated between the point from duty A, temperature A -> duty B, temperature B. - This output will automatomatically start when a print starts and will default to the default dutu cycle when print is complete. + This output will automatomatically start when a print starts and will default to the default duty cycle when print is complete. @@ -159,7 +159,7 @@ - +