mirror of
https://github.com/geekgeekrun/geekgeekrun.git
synced 2026-09-07 08:27:13 +08:00
fix includes in not a function
This commit is contained in:
@@ -39,6 +39,9 @@ function combine(arr, min, max) {
|
|||||||
// 生成符合"0"限制的组合
|
// 生成符合"0"限制的组合
|
||||||
function combineWithZero(arr, min, max) {
|
function combineWithZero(arr, min, max) {
|
||||||
let combineResult;
|
let combineResult;
|
||||||
|
if (!Array.isArray(arr)) {
|
||||||
|
arr = []
|
||||||
|
}
|
||||||
if (arr.includes(0)) {
|
if (arr.includes(0)) {
|
||||||
// 如果包含 0,0不参与组合
|
// 如果包含 0,0不参与组合
|
||||||
combineResult = [].concat(
|
combineResult = [].concat(
|
||||||
|
|||||||
Reference in New Issue
Block a user