1
Fork 0
mirror of https://github.com/jech/galene.git synced 2024-12-22 23:35:46 +01:00

Fix handling of empty strings in reflectSettings.

This commit is contained in:
Juliusz Chroboczek 2020-11-30 21:53:25 +01:00
parent 8df19bc760
commit 9110d03a9a

View file

@ -183,29 +183,31 @@ function reflectSettings() {
setLocalMute(settings.localMute);
let videoselect = getSelectElement('videoselect');
if(!settings.video || !selectOptionAvailable(videoselect, settings.video)) {
if(!settings.hasOwnProperty('video') ||
!selectOptionAvailable(videoselect, settings.video)) {
settings.video = selectOptionDefault(videoselect);
store = true;
}
videoselect.value = settings.video;
let audioselect = getSelectElement('audioselect');
if(!settings.audio || !selectOptionAvailable(audioselect, settings.audio)) {
if(!settings.hasOwnProperty('audio') ||
!selectOptionAvailable(audioselect, settings.audio)) {
settings.audio = selectOptionDefault(audioselect);
store = true;
}
audioselect.value = settings.audio;
if(settings.request)
if(settings.hasOwnProperty('request')) {
getSelectElement('requestselect').value = settings.request;
else {
} else {
settings.request = getSelectElement('requestselect').value;
store = true;
}
if(settings.send)
if(settings.hasOwnProperty('send')) {
getSelectElement('sendselect').value = settings.send;
else {
} else {
settings.send = getSelectElement('sendselect').value;
store = true;
}
@ -216,7 +218,6 @@ function reflectSettings() {
if(store)
storeSettings(settings);
}
function showVideo() {