diff --git a/frontend/package.json b/frontend/package.json index 933bf61..7bbe166 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -44,7 +44,7 @@ "tslint": "^6.1.1", "tslint-config-prettier": "^1.18.0", "tslint-plugin-prettier": "^2.3.0", - "typescript": "^2.9.2" + "typescript": "^4.4.2" }, "lint-staged": { "src/**/*.{ts,tsx,json,css}": [ diff --git a/frontend/src/Connection.ts b/frontend/src/Connection.ts index c8fdcde..23ddb1e 100644 --- a/frontend/src/Connection.ts +++ b/frontend/src/Connection.ts @@ -487,7 +487,7 @@ export class Connection { this.clean(); // Force reload from the server - setTimeout(() => window.location.reload(true), 3000); + setTimeout(() => window.location.reload(), 3000); } private clean() { diff --git a/frontend/src/common/helpers.ts b/frontend/src/common/helpers.ts index e89f3df..ba2aa50 100644 --- a/frontend/src/common/helpers.ts +++ b/frontend/src/common/helpers.ts @@ -119,7 +119,9 @@ export class NumStats { let sum = 0; - for (const n of list.sort((a, b) => a - b).slice(extremes, -extremes)) { + for (const n of [...list] + .sort((a, b) => a - b) + .slice(extremes, -extremes)) { sum += n; } diff --git a/frontend/yarn.lock b/frontend/yarn.lock index cb8103b..3e1d81f 100644 --- a/frontend/yarn.lock +++ b/frontend/yarn.lock @@ -9467,10 +9467,10 @@ typedarray@^0.0.6: resolved "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= -typescript@^2.9.2: - version "2.9.2" - resolved "https://registry.npmjs.org/typescript/-/typescript-2.9.2.tgz#1cbf61d05d6b96269244eb6a3bce4bd914e0f00c" - integrity sha512-Gr4p6nFNaoufRIY4NMdpQRNmgxVIGMs4Fcu/ujdYk3nAZqk7supzBE9idmvfZIlH/Cuj//dvi+019qEue9lV0w== +typescript@^4.4.2: + version "4.4.2" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.4.2.tgz#6d618640d430e3569a1dfb44f7d7e600ced3ee86" + integrity sha512-gzP+t5W4hdy4c+68bfcv0t400HVJMMd2+H9B7gae1nQlBzCqvrXX+6GL/b3GAgyTH966pzrZ70/fRjwAtZksSQ== uglify-es@^3.3.4: version "3.3.9"