From 604aa8598d1c89c272a545d529828d3f7007ca51 Mon Sep 17 00:00:00 2001 From: Maxim Rubis Date: Thu, 7 Jun 2018 09:13:17 -0400 Subject: [PATCH] Fixed: set default empty tokens configuration if nothing is passed. Fixed: NPM on Windows doesn't like path in single quotes. --- lib/ClientManager.js | 2 ++ package.json | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/ClientManager.js b/lib/ClientManager.js index 65686f1..9c62d03 100644 --- a/lib/ClientManager.js +++ b/lib/ClientManager.js @@ -11,6 +11,8 @@ class ClientManager { constructor(opt) { this.opt = opt || {}; + this.opt.tokens = this.opt.tokens || {}; + // id -> client instance this.clients = new Map(); diff --git a/package.json b/package.json index 0693b8d..c166166 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,7 @@ "ws": "5.1.1" }, "scripts": { - "test": "mocha --check-leaks --require esm './**/*.test.js'", + "test": "mocha --check-leaks --require esm ./**/*.test.js", "start": "./bin/server", "dev": "node-dev bin/server --port 3000" }