From f09e4b91ab9af0f1cc5bc3623090eb14485df458 Mon Sep 17 00:00:00 2001 From: Kevin Jahns Date: Wed, 18 Sep 2019 15:16:29 +0200 Subject: [PATCH] make ws-server opts optional --- bin/utils.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/utils.js b/bin/utils.js index d52069e..ea76c8c 100644 --- a/bin/utils.js +++ b/bin/utils.js @@ -161,8 +161,9 @@ const pingTimeout = 30000 /** * @param {any} conn * @param {any} req + * @param {any} opts */ -exports.setupWSConnection = (conn, req, { docName = req.url.slice(1), gc = true }) => { +exports.setupWSConnection = (conn, req, { docName = req.url.slice(1), gc = true } = {}) => { conn.binaryType = 'arraybuffer' // get doc, create if it does not exist yet const doc = map.setIfUndefined(docs, docName, () => {