You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-12-16 09:42:23 +03:00
prevent powerLevels being undef
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
@@ -272,7 +272,7 @@ RoomState.prototype.maySendRedactionForEvent = function(mxEvent, userId) {
|
|||||||
RoomState.prototype._hasSufficientPowerLevelFor = function(action, powerLevel) {
|
RoomState.prototype._hasSufficientPowerLevelFor = function(action, powerLevel) {
|
||||||
const powerLevelsEvent = this.getStateEvents('m.room.power_levels', '');
|
const powerLevelsEvent = this.getStateEvents('m.room.power_levels', '');
|
||||||
|
|
||||||
let powerLevels;
|
let powerLevels = {};
|
||||||
if (powerLevelsEvent) {
|
if (powerLevelsEvent) {
|
||||||
powerLevels = powerLevelsEvent.getContent();
|
powerLevels = powerLevelsEvent.getContent();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user