Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fix node 0.6.0 compat mode for {fs,path}.exists(Sync)

  • Loading branch information...
commit 3d69d637a0ce3584218585db45d2417e3819d67b 1 parent 0d882ad
@xaiki xaiki authored ozten committed
Showing with 4 additions and 2 deletions.
  1. +4 −2 lib/i18n.js
View
6 lib/i18n.js
@@ -48,6 +48,8 @@ exports.abide = function (options) {
if (! options.i18n_json_dir) options.i18n_json_dir = 'resources/static/i18n/';
if (! options.logger) options.logger = console;
+ var exists = fs.existsSync || path.existsSync;
+
var logger = options.logger;
var mo_file_path = function (locale) {
@@ -68,8 +70,8 @@ exports.abide = function (options) {
default_locale = localeFrom(options.default_lang);
mo_cache[l] = {
- mo_exists: path.existsSync(mo_file_path(l)),
- /* json_exists: path.existsSync(json_file_path(l)), */
+ mo_exists: path.exists(mo_file_path(l)),
+ /* json_exists: path.exists(json_file_path(l)), */
gt: null
};
if (l !== debug_locale) {
Please sign in to comment.
Something went wrong with that request. Please try again.