From c7820d1b7f4e2d40bf07fa311590c0d4af7a90f2 Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Tue, 1 Nov 2016 19:26:39 +0100 Subject: [PATCH] custom module: dont load if false --- app/main/osc.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/main/osc.js b/app/main/osc.js index a07ad32b..a5729874 100644 --- a/app/main/osc.js +++ b/app/main/osc.js @@ -16,7 +16,9 @@ var oscServer = new osc.UDPPort({ }); var customModule = (function(){ - var file = (function(){try {return fs.readFileSync(settings.read('customModule'),'utf8')} catch(err) {console.log('File not found: ' + settings.read('customModule'));return false}})(), + if (!settings.read('customModule')) return false + + var file = (function(){try {return fs.readFileSync(settings.read('customModule'),'utf8')} catch(err) {console.log('CustomModule Error: File not found: ' + settings.read('customModule'));return false}})(), mod, context = { console:console,