From aff310b51a74254b98edce424e623bc601f431fe Mon Sep 17 00:00:00 2001 From: geekgeekrun Date: Thu, 5 Feb 2026 21:39:02 +0800 Subject: [PATCH] fix `includes in not a function` --- packages/geek-auto-start-chat-with-boss/combineCalculator.mjs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/geek-auto-start-chat-with-boss/combineCalculator.mjs b/packages/geek-auto-start-chat-with-boss/combineCalculator.mjs index bbd7c3f..895767a 100644 --- a/packages/geek-auto-start-chat-with-boss/combineCalculator.mjs +++ b/packages/geek-auto-start-chat-with-boss/combineCalculator.mjs @@ -39,6 +39,9 @@ function combine(arr, min, max) { // 生成符合"0"限制的组合 function combineWithZero(arr, min, max) { let combineResult; + if (!Array.isArray(arr)) { + arr = [] + } if (arr.includes(0)) { // 如果包含 0,0不参与组合 combineResult = [].concat(