mirror of https://github.com/vector-im/riot-web
Merge pull request #3629 from matrix-org/travis/breadcrumbs-fix
Add a bit more safety around breadcrumbspull/21833/head
commit
fea8737632
|
@ -126,6 +126,7 @@ export default class AccountSettingsHandler extends MatrixClientBackedSettingsHa
|
||||||
if (!content || !content['recent_rooms']) {
|
if (!content || !content['recent_rooms']) {
|
||||||
content = this._getSettings(BREADCRUMBS_LEGACY_EVENT_TYPE);
|
content = this._getSettings(BREADCRUMBS_LEGACY_EVENT_TYPE);
|
||||||
}
|
}
|
||||||
|
if (!content) content = {}; // If we still don't have content, make some
|
||||||
|
|
||||||
content['recent_rooms'] = newValue;
|
content['recent_rooms'] = newValue;
|
||||||
return MatrixClientPeg.get().setAccountData(BREADCRUMBS_EVENT_TYPE, content);
|
return MatrixClientPeg.get().setAccountData(BREADCRUMBS_EVENT_TYPE, content);
|
||||||
|
|
Loading…
Reference in New Issue