From 414e046dfa5a60cb6a3012bdae3a3970599fa815 Mon Sep 17 00:00:00 2001 From: Mathijs van Westendorp Date: Sat, 23 Feb 2019 09:51:55 +0100 Subject: [PATCH] Fix error `Error Path must be a string. Received undefined` --- eurlex.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/eurlex.js b/eurlex.js index c82701f..bbaf5e0 100755 --- a/eurlex.js +++ b/eurlex.js @@ -82,6 +82,9 @@ var _profile = false; try { (function(){ var _check = function(p) { + if (arguments[0] === undefined || arguments[1] === undefined){ + return false; + } var _file = path.resolve.apply(this, new args(arguments).array); return (fs.existsSync(_file) && fs.statSync(_file).isFile()) ? _file : false; }