1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-12-17 21:42:17 +03:00

prevent powerLevels being undef

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Michael Telatynski
2017-05-23 14:53:11 +01:00
parent 69ed6f283d
commit 516dc1043e

View File

@@ -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();
} }