mirror of
https://github.com/element-hq/element-web
synced 2024-11-28 20:38:55 +03:00
Don't crash if there isn't a room notif rule
This commit is contained in:
parent
be5e67245b
commit
ff5e00d244
1 changed files with 1 additions and 1 deletions
|
@ -224,7 +224,7 @@ module.exports = React.createClass({
|
|||
if (roomNotifTextNodes.length > 0) {
|
||||
const pushProcessor = new PushProcessor(MatrixClientPeg.get());
|
||||
const atRoomRule = pushProcessor.getPushRuleById(".m.rule.roomnotif");
|
||||
if (pushProcessor.ruleMatchesEvent(atRoomRule, this.props.mxEvent)) {
|
||||
if (atRoomRule && pushProcessor.ruleMatchesEvent(atRoomRule, this.props.mxEvent)) {
|
||||
// Now replace all those nodes with Pills
|
||||
for (const roomNotifTextNode of roomNotifTextNodes) {
|
||||
const pillContainer = document.createElement('span');
|
||||
|
|
Loading…
Reference in a new issue