mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-01 07:47:49 +00:00
Correct name of var and add missing import. (#2999)
This commit is contained in:
committed by
John-David Dalton
parent
8429c1db36
commit
a822979881
@@ -1,4 +1,5 @@
|
||||
import isIterateeCall from './.internal/isIterateeCall.js'
|
||||
import copyArray from './.internal/copyArray.js'
|
||||
import toInteger from './toInteger.js'
|
||||
|
||||
/**
|
||||
@@ -20,7 +21,7 @@ import toInteger from './toInteger.js'
|
||||
* // => [2, 3, 1]
|
||||
*/
|
||||
function sampleSize(array, n, guard) {
|
||||
if ((guard ? isIterateeCall(collection, n, guard) : n === undefined)) {
|
||||
if ((guard ? isIterateeCall(array, n, guard) : n === undefined)) {
|
||||
n = 1
|
||||
} else {
|
||||
n = toInteger(n)
|
||||
|
||||
Reference in New Issue
Block a user