From 9cd301711b70bb6ee1c28384ab7fea9df295a120 Mon Sep 17 00:00:00 2001 From: Moritz Hoffmann Date: Fri, 18 Nov 2016 02:54:30 +0100 Subject: [PATCH] Cleanup options workaround --- drivers/bbdmx.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/bbdmx.js b/drivers/bbdmx.js index a118e38..4490b72 100644 --- a/drivers/bbdmx.js +++ b/drivers/bbdmx.js @@ -8,11 +8,7 @@ function BBDMX(device_id, options) { self.universe = new Buffer(512); self.universe.fill(0); self.host = device_id || '127.0.0.1'; - if (typeof options === 'undefined') { - self.port = 9930; - } else { - self.port = options.port || 9930; - } + self.port = self.options.port || 9930; self.dev = dgram.createSocket('udp4'); self.sleepTime = 24; self.start();