From: Mihai Bazon Date: Thu, 25 Oct 2012 07:58:48 +0000 (+0300) Subject: test for fs.existsSync X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=202fb937995086561421719b2b26449757e80913;p=UglifyJS.git test for fs.existsSync --- diff --git a/tools/node.js b/tools/node.js index de749bb3..4a891380 100644 --- a/tools/node.js +++ b/tools/node.js @@ -9,7 +9,9 @@ var fs = require("fs"); // but by the time you can set that the `path` module is already // loaded and `path.existsSync` is already changed to display that // warning, therefore here's the poor solution: -path.existsSync = fs.existsSync; +if (fs.existsSync) { + path.existsSync = fs.existsSync; +} var vm = require("vm"); var sys = require("util");