fix: cookie undefined

This commit is contained in:
shanmite 2021-01-06 21:06:04 +08:00
parent 229c47f5ed
commit 6bd245ad70

View File

@ -1,7 +1,5 @@
const setGlobalVar = require("./lib/setCookie");
const isUndefined = value => typeof value === 'undefined';
const {
SCKEY,
COOKIE,
@ -14,7 +12,7 @@ const {
const COOKIE_ARR = [COOKIE, COOKIE_2, COOKIE_3, COOKIE_4, COOKIE_5];
COOKIE_ARR.forEach((cookie, num) => {
if (isUndefined(cookie)) return;
if (typeof cookie === 'undefined') return;
setGlobalVar(cookie, SCKEY).then(async () => {
const { start, isMe, checkCookie } = require("./lib/lottery-in-nodejs");
const isRight = await checkCookie(num + 1);