Fixes bug where a participant was chosen twice

This commit is contained in:
Maël Nison 2019-11-03 11:01:46 +01:00
parent 627eaa57f6
commit 75dc799599
2 changed files with 2 additions and 2 deletions

View file

@ -62,7 +62,7 @@ SecretSanta.prototype.generate = function () {
} );
pairings[ name ] = this.enforced[ name ];
candidatePairings[ name ] = [ this.enforced[ name ] ];
} else {

View file

@ -372,7 +372,7 @@
return error( 'Syntax error: "' + lines[ t ] + '" isn\'t valid' );
var name = match[ 1 ];
var rules = match[ 2 ] ? match[ 2 ].match(/[!=][^!=]+/) : null;
var rules = match[ 2 ] ? match[ 2 ].match(/[!=][^!=]+/g) : null;
var person = santa.add( name );