Only commit a non-falsy tags list
This commit is contained in:
parent
0b38bf5e7b
commit
8d2d3e62cd
1 changed files with 7 additions and 3 deletions
|
@ -23,10 +23,14 @@ const TagOrderActions = {};
|
|||
TagOrderActions.commitTagOrdering = createPromiseActionCreator(
|
||||
'TagOrderActions.commitTagOrdering',
|
||||
(matrixClient) => {
|
||||
// Only commit tags if the state is ready, i.e. not null
|
||||
const tags = TagOrderStore.getOrderedTags();
|
||||
if (!tags) {
|
||||
return;
|
||||
}
|
||||
|
||||
Analytics.trackEvent('TagOrderActions', 'commitTagOrdering');
|
||||
return matrixClient.setAccountData('im.vector.web.tag_ordering', {
|
||||
tags: TagOrderStore.getOrderedTags(),
|
||||
});
|
||||
return matrixClient.setAccountData('im.vector.web.tag_ordering', {tags});
|
||||
},
|
||||
);
|
||||
|
||||
|
|
Loading…
Reference in a new issue