underscore读取,排行榜保护
This commit is contained in:
@@ -7,7 +7,7 @@ import path = require('path');
|
||||
import { DicRandomEffectPool } from './dictionary/DicRandomEffectPool';
|
||||
import { HERO_CE_RATIO, ABI_STAGE } from '../consts';
|
||||
|
||||
const _ = require('underscore');
|
||||
import { uniq, findWhere, findIndex } from 'underscore';
|
||||
|
||||
const moment = require('moment');
|
||||
|
||||
@@ -475,7 +475,7 @@ export function parseNumberList(str: string) {
|
||||
export function mergeSameGoods(goods: Array<{ id: number, count: number }>) {
|
||||
let resGoods = [];
|
||||
for (let { id, count } of goods) {
|
||||
let index = _.findIndex(resGoods, { id });
|
||||
let index = findIndex(resGoods, { id });
|
||||
if (index > -1) {
|
||||
resGoods[index].count += count;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user