mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-16 13:14:58 +08:00
Merge remote-tracking branch 'origin/develop' into develop
This commit is contained in:
commit
deec515e97
@ -58,8 +58,7 @@ function getUserWidgetsArray() {
|
||||
*/
|
||||
function getStickerpickerWidgets() {
|
||||
const widgets = getUserWidgetsArray();
|
||||
const stickerpickerWidgets = widgets.filter((widget) => widget.type='m.stickerpicker');
|
||||
return stickerpickerWidgets;
|
||||
return widgets.filter((widget) => widget.content && widget.content.type === "m.stickerpicker");
|
||||
}
|
||||
|
||||
/**
|
||||
@ -73,7 +72,7 @@ function removeStickerpickerWidgets() {
|
||||
}
|
||||
const userWidgets = client.getAccountData('m.widgets').getContent() || {};
|
||||
Object.entries(userWidgets).forEach(([key, widget]) => {
|
||||
if (widget.type === 'm.stickerpicker') {
|
||||
if (widget.content && widget.content.type === 'm.stickerpicker') {
|
||||
delete userWidgets[key];
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user