mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-16 21:24:59 +08:00
Merge pull request #6942 from SimonBrandner/fix/autoplay-setting
Don't `setValue()` if that would lead to setting a `null`/`undefined`
This commit is contained in:
commit
1f7d07ab6c
@ -118,8 +118,10 @@ export default class AccountSettingsHandler extends MatrixClientBackedSettingsHa
|
|||||||
if (value === null || value === undefined) {
|
if (value === null || value === undefined) {
|
||||||
const oldCombinedValue = settings["autoplayGifsAndVideos"];
|
const oldCombinedValue = settings["autoplayGifsAndVideos"];
|
||||||
// Write, so that we can remove this in the future
|
// Write, so that we can remove this in the future
|
||||||
this.setValue("autoplayGifs", roomId, oldCombinedValue);
|
if (oldCombinedValue !== null && oldCombinedValue !== undefined) {
|
||||||
this.setValue("autoplayVideo", roomId, oldCombinedValue);
|
this.setValue("autoplayGifs", roomId, oldCombinedValue);
|
||||||
|
this.setValue("autoplayVideo", roomId, oldCombinedValue);
|
||||||
|
}
|
||||||
return oldCombinedValue;
|
return oldCombinedValue;
|
||||||
}
|
}
|
||||||
return value;
|
return value;
|
||||||
|
Loading…
Reference in New Issue
Block a user