From 1153ce43c6c2af45031a4a3dbaedc37d6a408241 Mon Sep 17 00:00:00 2001 From: Matthew Hodgson Date: Wed, 3 Apr 2019 20:38:25 +0100 Subject: [PATCH] fix NPE for rooms with redacted tombstones --- src/matrix-to.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/matrix-to.js b/src/matrix-to.js index 15979000c4..99a02dc42d 100644 --- a/src/matrix-to.js +++ b/src/matrix-to.js @@ -241,7 +241,7 @@ export function makeRoomPermalink(roomId) { // If the roomId isn't actually a room ID, don't try to list the servers. // Aliases are already routable, and don't need extra information. - if (roomId[0] !== '!') return permalinkBase; + if (!roomId || roomId[0] !== '!') return permalinkBase; const client = MatrixClientPeg.get(); const room = client.getRoom(roomId);