mirror of
https://github.com/jech/galene.git
synced 2024-11-22 08: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);
|
||||
|
||||
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() {
|
||||
|
|
Loading…
Reference in a new issue