diff options
| author | Marak <[email protected]> | 2014-09-16 08:33:32 +0200 |
|---|---|---|
| committer | Marak <[email protected]> | 2014-09-16 08:33:32 +0200 |
| commit | eb18a2f721e3781ceb5cc20f431450d20a166b3e (patch) | |
| tree | 20ceea90d82432180606de59d037ff87fbf039f0 | |
| parent | 2228216acb4f29dae1e29282c57e7aa49c474752 (diff) | |
| parent | 911de0430f6a3c5fd0e421cd1940876d68965e5a (diff) | |
| download | faker-eb18a2f721e3781ceb5cc20f431450d20a166b3e.tar.xz faker-eb18a2f721e3781ceb5cc20f431450d20a166b3e.zip | |
Merge pull request #121 from beastlike/master
[fix] replaced string[index] with charAt - issue 91
| -rw-r--r-- | lib/helpers.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/helpers.js b/lib/helpers.js index b911d918..4be157ed 100644 --- a/lib/helpers.js +++ b/lib/helpers.js @@ -24,10 +24,10 @@ exports.replaceSymbolWithNumber = function (string, symbol) { var str = ''; for (var i = 0; i < string.length; i++) { - if (string[i] == symbol) { + if (string.charAt(i) == symbol) { str += faker.random.number(9); } else { - str += string[i]; + str += string.charAt(i); } } return str; |
