Closed Turtlepaw closed 2 years ago
Can you post your code that calls getStats()
? Seems like you didn't correctly add the ids
parameter...
As @EndBug said, it's probably that (javascript moment). But to say for sure we need to see snippet of your code where you are using r6api.js
This was the only part that had join
so here it is:
const raw = options && options.raw || false;
const limit = 7500 - ids.join(',').length; //⭐
const stats = [...new Set(options && options.categories
? options.categories.map(category => constants_1.STATS_CATEGORIES[category]).flat(2)
: Object.values(constants_1.STATS_CATEGORIES).flat(2))]
.reduce((acc, cur) => {
const index = acc.length ? acc.length - 1 : 0;
const string = acc[index] ? `${acc[index]},${cur}` : cur;
return string.length <= limit
? Object.assign(acc, { [index]: string })
: [...acc, cur];
}, []);
snippet of your code
ids
should always be string[]
unless you are providing undefined