mirror of
https://github.com/jech/galene.git
synced 2024-11-14 04:35:57 +01:00
Fix handling of empty strings in reflectSettings.
This commit is contained in:
parent
8df19bc760
commit
9110d03a9a
1 changed files with 8 additions and 7 deletions
|
@ -183,29 +183,31 @@ function reflectSettings() {
|
||||||
setLocalMute(settings.localMute);
|
setLocalMute(settings.localMute);
|
||||||
|
|
||||||
let videoselect = getSelectElement('videoselect');
|
let videoselect = getSelectElement('videoselect');
|
||||||
if(!settings.video || !selectOptionAvailable(videoselect, settings.video)) {
|
if(!settings.hasOwnProperty('video') ||
|
||||||
|
!selectOptionAvailable(videoselect, settings.video)) {
|
||||||
settings.video = selectOptionDefault(videoselect);
|
settings.video = selectOptionDefault(videoselect);
|
||||||
store = true;
|
store = true;
|
||||||
}
|
}
|
||||||
videoselect.value = settings.video;
|
videoselect.value = settings.video;
|
||||||
|
|
||||||
let audioselect = getSelectElement('audioselect');
|
let audioselect = getSelectElement('audioselect');
|
||||||
if(!settings.audio || !selectOptionAvailable(audioselect, settings.audio)) {
|
if(!settings.hasOwnProperty('audio') ||
|
||||||
|
!selectOptionAvailable(audioselect, settings.audio)) {
|
||||||
settings.audio = selectOptionDefault(audioselect);
|
settings.audio = selectOptionDefault(audioselect);
|
||||||
store = true;
|
store = true;
|
||||||
}
|
}
|
||||||
audioselect.value = settings.audio;
|
audioselect.value = settings.audio;
|
||||||
|
|
||||||
if(settings.request)
|
if(settings.hasOwnProperty('request')) {
|
||||||
getSelectElement('requestselect').value = settings.request;
|
getSelectElement('requestselect').value = settings.request;
|
||||||
else {
|
} else {
|
||||||
settings.request = getSelectElement('requestselect').value;
|
settings.request = getSelectElement('requestselect').value;
|
||||||
store = true;
|
store = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(settings.send)
|
if(settings.hasOwnProperty('send')) {
|
||||||
getSelectElement('sendselect').value = settings.send;
|
getSelectElement('sendselect').value = settings.send;
|
||||||
else {
|
} else {
|
||||||
settings.send = getSelectElement('sendselect').value;
|
settings.send = getSelectElement('sendselect').value;
|
||||||
store = true;
|
store = true;
|
||||||
}
|
}
|
||||||
|
@ -216,7 +218,6 @@ function reflectSettings() {
|
||||||
|
|
||||||
if(store)
|
if(store)
|
||||||
storeSettings(settings);
|
storeSettings(settings);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function showVideo() {
|
function showVideo() {
|
||||||
|
|
Loading…
Reference in a new issue