diff --git a/lib/i18n/i18n.js b/lib/i18n/i18n.js index b7cc762..468c237 100644 --- a/lib/i18n/i18n.js +++ b/lib/i18n/i18n.js @@ -14,13 +14,13 @@ module.exports = (function () { if (cache.hasOwnProperty(i18n_path)) { i18n = cache[i18n_path]; - } else if (path.existsSync(i18n_path + '.js')) { + } else if (fs.existsSync(i18n_path + '.js')) { i18n = require(i18n_path); } else if (i18n_locale !== DEFAULT_LOCALE) { i18n_path = path.join(base_path, DEFAULT_LOCALE, name); - if (path.existsSync(i18n_path + '.js')) { + if (fs.existsSync(i18n_path + '.js')) { i18n = require(i18n_path); cache[i18n_path] = i18n; } diff --git a/lib/mvc.js b/lib/mvc.js index e6e038c..2ce6a65 100644 --- a/lib/mvc.js +++ b/lib/mvc.js @@ -68,7 +68,7 @@ //Let's cache our loaded objects. if (cache.hasOwnProperty(object_path)) { object = cache[object_path]; - } else if (path.existsSync(object_path + '.js')) { + } else if (fs.existsSync(object_path + '.js')) { object = require(object_path); } else { this.logger.notice("Unable to load MVC object: " + object_path);