remove randomness

Reviewed By: @javache

Differential Revision: D2490001
This commit is contained in:
Amjad Masad 2015-09-29 12:41:06 -07:00 committed by facebook-github-bot-4
parent 2cf80d481b
commit 40cecf94b3
1 changed files with 2 additions and 4 deletions

View File

@ -103,16 +103,14 @@ class HasteMap {
chalk.yellow( chalk.yellow(
'\nWARNING: Found multiple haste modules or packages ' + '\nWARNING: Found multiple haste modules or packages ' +
'with the name `%s`. Please fix this by adding it to ' + 'with the name `%s`. Please fix this by adding it to ' +
'the blacklist or deleting the modules keeping only one.\n' + 'the blacklist or deleting the modules keeping only one.\n'
'One of the following modules will be selected at random:\n%s\n'
), ),
name, name,
modules.map(m => m.path).join('\n'), modules.map(m => m.path).join('\n'),
); );
} }
const randomIndex = Math.floor(Math.random() * modules.length); return modules[0];
return modules[randomIndex];
} }
return modules[0]; return modules[0];