mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-17 22:14:58 +08:00
Handle remove sticker picker errors.
This commit is contained in:
parent
2e6d6c83cd
commit
003cf61388
@ -66,10 +66,14 @@ export default class Stickerpicker extends React.Component {
|
|||||||
} else {
|
} else {
|
||||||
console.warn('No widget ID specified, not disabling assets');
|
console.warn('No widget ID specified, not disabling assets');
|
||||||
}
|
}
|
||||||
Widgets.removeStickerpickerWidgets();
|
|
||||||
this._getStickerPickerWidget();
|
|
||||||
// Wrap this in a timeout in order to avoid the DOM node from being pulled from under its feet
|
// Wrap this in a timeout in order to avoid the DOM node from being pulled from under its feet
|
||||||
setTimeout(() => this.stickersMenu.close());
|
setTimeout(() => this.stickersMenu.close());
|
||||||
|
Widgets.removeStickerpickerWidgets().then(() => {
|
||||||
|
this._getStickerPickerWidget();
|
||||||
|
}).catch((e) => {
|
||||||
|
console.error('Failed to remove sticker picker widget', e);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
|
Loading…
Reference in New Issue
Block a user