mirror of
https://github.com/vector-im/element-web.git
synced 2025-09-01 20:01:19 +02:00
Only commit a non-falsy tags list
This commit is contained in:
parent
0b38bf5e7b
commit
8d2d3e62cd
@ -23,10 +23,14 @@ const TagOrderActions = {};
|
|||||||
TagOrderActions.commitTagOrdering = createPromiseActionCreator(
|
TagOrderActions.commitTagOrdering = createPromiseActionCreator(
|
||||||
'TagOrderActions.commitTagOrdering',
|
'TagOrderActions.commitTagOrdering',
|
||||||
(matrixClient) => {
|
(matrixClient) => {
|
||||||
|
// Only commit tags if the state is ready, i.e. not null
|
||||||
|
const tags = TagOrderStore.getOrderedTags();
|
||||||
|
if (!tags) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
Analytics.trackEvent('TagOrderActions', 'commitTagOrdering');
|
Analytics.trackEvent('TagOrderActions', 'commitTagOrdering');
|
||||||
return matrixClient.setAccountData('im.vector.web.tag_ordering', {
|
return matrixClient.setAccountData('im.vector.web.tag_ordering', {tags});
|
||||||
tags: TagOrderStore.getOrderedTags(),
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user