if (config.proto == 'netcam' || config.proto == 'v4l2') {
instance = '';
}
- else { /* motioneye */
+ else if (config.proto == 'motioneye') { /* motioneye */
instance = config.host || '';
if (config.port) {
instance += ':' + config.port;
function pushCameraConfig(reboot) {
var cameraConfig = cameraUi2Dict();
var cameraId = $('#cameraSelect').val();
+
+ if (!cameraId) {
+ return; /* event triggered without a selected camera */
+ }
pushConfigReboot = pushConfigReboot || reboot;
pushConfigs[cameraId] = cameraConfig;