Skip to content

Commit

Permalink
Dont load typo twice if you use a custom dictionary
Browse files Browse the repository at this point in the history
  • Loading branch information
PieterWigboldus committed Nov 10, 2017
1 parent 7770cde commit 2579987
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 7 deletions.
6 changes: 4 additions & 2 deletions dist/js/app.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/js/app.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions js/is_strong_password.js
Expand Up @@ -41,7 +41,7 @@ class StrongPassword {

this.dictionaries = params.dictionaries || false;

this.version = '1.1.1';
this.version = '1.1.2';

results = this.check();
this.strong = results.strong;
Expand All @@ -57,12 +57,14 @@ class StrongPassword {
let strong = true;
let reasonText;
let notRealWords = [];
let dictionary = new Typo(this.locale);
let dictionary;

if (this.dictionaries) {
dictionary = new Typo(this.locale, false, false, {
dictionaryPath: this.dictionaries
});
} else {
dictionary = new Typo(this.locale);
}

if (!this.password) {
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "strongpassword",
"version": "1.1.1",
"version": "1.1.2",
"description": "Check if the password is strong.",
"main": "js/is_strong_password.js",
"files": [
Expand Down

0 comments on commit 2579987

Please sign in to comment.