Fixes bug where a participant was chosen twice
This commit is contained in:
parent
627eaa57f6
commit
75dc799599
2 changed files with 2 additions and 2 deletions
|
@ -62,7 +62,7 @@ SecretSanta.prototype.generate = function () {
|
||||||
|
|
||||||
} );
|
} );
|
||||||
|
|
||||||
pairings[ name ] = this.enforced[ name ];
|
candidatePairings[ name ] = [ this.enforced[ name ] ];
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
|
|
|
@ -372,7 +372,7 @@
|
||||||
return error( 'Syntax error: "' + lines[ t ] + '" isn\'t valid' );
|
return error( 'Syntax error: "' + lines[ t ] + '" isn\'t valid' );
|
||||||
|
|
||||||
var name = match[ 1 ];
|
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 );
|
var person = santa.add( name );
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue