Merge pull request #2699 from matrix-org/travis/fix-bug-in-notifications

Fix NPE relating to toggling notifications
This commit is contained in:
Travis Ralston 2019-02-25 07:31:59 -07:00 committed by GitHub
commit addc7e519b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -537,12 +537,12 @@ module.exports = React.createClass({
case 'picture_snapshot':
this.uploadFile(payload.file);
break;
case 'notifier_enabled':
case 'upload_failed':
// 413: File was too big or upset the server in some way.
if(payload.error.http_status === 413) {
if (payload.error && payload.error.http_status === 413) {
this._fetchMediaConfig(true);
}
case 'notifier_enabled':
case 'upload_started':
case 'upload_finished':
this.forceUpdate();