summaryrefslogtreecommitdiff
path: root/http/src/js
diff options
context:
space:
mode:
Diffstat (limited to 'http/src/js')
-rw-r--r--http/src/js/1_main.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/http/src/js/1_main.js b/http/src/js/1_main.js
index 09e93c4..8c7d689 100644
--- a/http/src/js/1_main.js
+++ b/http/src/js/1_main.js
@@ -571,14 +571,14 @@ epgd.init = function () {
html += '<option value="' + uuid + '"' + (uuid == epgd.vdrs.current.uuid ? 'selected' : '') + '>' + epgd.vdrs.list[uuid].name + '</option>';
}
$('<select>' + html + '</select>').replaceAll('#menu_vdrs > select').show().change(function () {
- var vdr= epgd.vdrs.current = epgd.vdrs.get(this[this.selectedIndex].value);
+ var vdr= epgd.vdrs.current = this.selectedIndex >= 0 ? epgd.vdrs.get(this[this.selectedIndex].value) : {};
if (vdr && vdr.osd2webp)
$('#osd2web').prop("target", "osd2web_" + vdr.name)
.prop("href", "http://" + vdr.ip + ":" + vdr.osd2webp)
.click(function(ev){
ev.stopPropagation();
return true;
- }).show();
+ }).show();
else
$('#osd2web').hide();
}).mousedown(function (ev) {