From a197d77767b1f26867b99a64be4ef4e3f6c39d9b Mon Sep 17 00:00:00 2001 From: taitulism Date: Tue, 15 Apr 2014 01:50:09 +0300 Subject: [PATCH] fs.readFileSync() >>> read() if it's already cached on line 17... --- lib/ejs.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/ejs.js b/lib/ejs.js index c8cf6149..ce2b6694 100644 --- a/lib/ejs.js +++ b/lib/ejs.js @@ -1,4 +1,3 @@ - /*! * EJS * Copyright(c) 2012 TJ Holowaychuk @@ -351,7 +350,7 @@ if (require.extensions) { require.extensions['.ejs'] = function (module, filename) { filename = filename || module.filename; var options = { filename: filename, client: true } - , template = fs.readFileSync(filename).toString() + , template = read(filename).toString() , fn = compile(template, options); module._compile('module.exports = ' + fn.toString() + ';', filename); };