Fix bugs, clean up comments

This commit is contained in:
Pitchaya Boonsarngsuk
2018-01-31 08:39:13 +00:00
parent 1966421975
commit 3dbc8b1751
3 changed files with 9 additions and 8 deletions

View File

@@ -12,7 +12,7 @@ export function takeSampleFrom(sourceList, amount) {
let randElements = [],
max = sourceList.length;
if (amount <= max) {
if (amount >= max) {
return {sample: sourceList, remainder: {}};
}