summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/api/streaming.ts4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/api/streaming.ts b/src/api/streaming.ts
index 8348d7c38f..17db59fd0a 100644
--- a/src/api/streaming.ts
+++ b/src/api/streaming.ts
@@ -51,6 +51,10 @@ module.exports = (server: http.Server) => {
};
function authenticate(connection: websocket.connection, token: string): Promise<any> {
+ if (token == null) {
+ return Promise.resolve(null);
+ }
+
return new Promise(async (resolve, reject) => {
if (isNativeToken(token)) {
// Fetch user