fix cache issue on logout
This commit is contained in:
@@ -337,10 +337,10 @@ class MessagesView extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
leave(oldTopicName) {
|
leave(oldTopicName) {
|
||||||
if (!oldTopicName) {
|
if (!oldTopicName || !this.props.tinode.isTopicCached(oldTopicName)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
let oldTopic = this.props.tinode.getTopic(oldTopicName);
|
const oldTopic = this.props.tinode.getTopic(oldTopicName);
|
||||||
if (oldTopic && oldTopic.isSubscribed()) {
|
if (oldTopic && oldTopic.isSubscribed()) {
|
||||||
oldTopic.leave(false)
|
oldTopic.leave(false)
|
||||||
.catch(() => { /* do nothing here */ })
|
.catch(() => { /* do nothing here */ })
|
||||||
|
|||||||
Reference in New Issue
Block a user