Skip to content

Commit

Permalink
Merge pull request #218 from danieloprado/master
Browse files Browse the repository at this point in the history
Workaround for #214
  • Loading branch information
mikeerickson authored Nov 7, 2017
2 parents 23802a6 + 7c451cc commit 425eb1f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
10 changes: 7 additions & 3 deletions dist/validator.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! validatorjs - v3.13.3 - - 2017-08-22 */
/*! validatorjs - v3.13.5 - - 2017-10-09 */
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.Validator = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
function AsyncResolvers(onFailedOne, onResolvedAll) {
this.onResolvedAll = onResolvedAll;
Expand Down Expand Up @@ -336,6 +336,8 @@ var Messages = require('./messages');

require('./lang/en');

var require_method = require;

var container = {

messages: {},
Expand Down Expand Up @@ -376,8 +378,10 @@ var container = {
*/
_load: function(lang) {
if (!this.messages[lang]) {
var rawMessages = require('./lang/' + lang);
this._set(lang, rawMessages);
try {
var rawMessages = require_method('./lang/' + lang);
this._set(lang, rawMessages);
} catch (e) {}
}
},

Expand Down
8 changes: 6 additions & 2 deletions src/lang.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ var Messages = require('./messages');

require('./lang/en');

var require_method = require;

var container = {

messages: {},
Expand Down Expand Up @@ -42,8 +44,10 @@ var container = {
*/
_load: function(lang) {
if (!this.messages[lang]) {
var rawMessages = require('./lang/' + lang);
this._set(lang, rawMessages);
try {
var rawMessages = require_method('./lang/' + lang);
this._set(lang, rawMessages);
} catch (e) {}
}
},

Expand Down

0 comments on commit 425eb1f

Please sign in to comment.