From d666aa04614d423596d931b3b264ac32bd7328fe Mon Sep 17 00:00:00 2001 From: ilearnio Date: Thu, 28 Jul 2016 21:16:06 +0300 Subject: [PATCH] Default value for options --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index e8f582b..949034c 100644 --- a/index.js +++ b/index.js @@ -6,7 +6,7 @@ function Client (options) { if (!options.url) throw new Error('Missing url parameter') - self.options = options + self.options = options || {} self.url = options.url // A stack of registered listeners