Prevent from being paired with yourself
This commit is contained in:
parent
10e888a4cc
commit
5f90fc5562
1 changed files with 1 additions and 1 deletions
|
@ -38,7 +38,7 @@ SecretSanta.prototype.generate = function () {
|
|||
|
||||
this.names.forEach( function ( name ) {
|
||||
|
||||
var candidates = _.difference( this.names, name );
|
||||
var candidates = _.difference( this.names, [ name ] );
|
||||
|
||||
if ( Object.prototype.hasOwnProperty.call( this.blacklists, name ) )
|
||||
candidates = _.difference( candidates, this.blacklists[ name ] );
|
||||
|
|
Loading…
Reference in a new issue