diff --git a/.eslintrc.json b/.eslintrc.json index 23c7441..57cb341 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -12,6 +12,7 @@ "globalThis": "readonly" }, "rules": { + "prefer-spread": "off", "no-console": "off", "no-useless-escape": "off", "no-undef": "warn", diff --git a/src/utils/functions.ts b/src/utils/functions.ts index 8ce61cd..92b7a7d 100644 --- a/src/utils/functions.ts +++ b/src/utils/functions.ts @@ -11,7 +11,7 @@ import { NotFound } from './errors.js' // Thoroughly tested, faster than both spread and concat w/ high No. of items. export const fastMerge = (original: T[], args: T[]) => { - original.push.apply(args) + original.push.apply(original, args) return original } diff --git a/tests/squaremap/nations.test.ts b/tests/squaremap/nations.test.ts index fd44e76..f62228d 100644 --- a/tests/squaremap/nations.test.ts +++ b/tests/squaremap/nations.test.ts @@ -16,6 +16,6 @@ describe('[Squaremap/Aurora] Nations', () => { assertType(nation) expect(nation.name).toBe('Madagascar') - console.log(nation) + console.log(nation.residents.length) }) }) \ No newline at end of file