fix: flatMap is not a function (#218)

Fixed #218
This commit is contained in:
shanmite 2022-11-07 13:33:07 +08:00
parent 727883a269
commit 8bf5070459

View File

@ -42,8 +42,9 @@ let global_var = {
LotteryOrder LotteryOrder
.map(it => LotteryOrderMap.get(it)) .map(it => LotteryOrderMap.get(it))
.filter(it => typeof it === "string") .filter(it => typeof it === "string")
.flatMap(lottery_option => config[lottery_option] .map(lottery_option => config[lottery_option].map(it => [lottery_option, it]))
.map(it => [lottery_option, it]))); .flat()
);
this.set('remoteconfig', await getRemoteConfig()); this.set('remoteconfig', await getRemoteConfig());
} }
await createDir('dyids'); await createDir('dyids');