mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-09 18:37:50 +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 isIterateeCall from './.internal/isIterateeCall.js'
|
||||||
|
import copyArray from './.internal/copyArray.js'
|
||||||
import toInteger from './toInteger.js'
|
import toInteger from './toInteger.js'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -20,7 +21,7 @@ import toInteger from './toInteger.js'
|
|||||||
* // => [2, 3, 1]
|
* // => [2, 3, 1]
|
||||||
*/
|
*/
|
||||||
function sampleSize(array, n, guard) {
|
function sampleSize(array, n, guard) {
|
||||||
if ((guard ? isIterateeCall(collection, n, guard) : n === undefined)) {
|
if ((guard ? isIterateeCall(array, n, guard) : n === undefined)) {
|
||||||
n = 1
|
n = 1
|
||||||
} else {
|
} else {
|
||||||
n = toInteger(n)
|
n = toInteger(n)
|
||||||
|
|||||||
Reference in New Issue
Block a user