mirror of
https://github.com/pezkuwichain/pezkuwi-telemetry.git
synced 2026-06-13 09:11:03 +00:00
frontend: Upgrade TypeScript from 2.9.2 to 4.4.2 (#387)
* Upgrade TS from 2.9.2 to 4.4.2 * Avoid mutating a readonly array `list` is a readonly array but `sort` will mutate the array in-place. In newer version of TS, it can catch this unexpected behavior. To avoid mutating a readonly array, we can sort with a new array with either `[...list]` or `list.slice()`. * Fix arguments of `window.location.reload` The `reload` function type definition in `lib.dom.d.ts` takes 0 arguments now. So, we cannot pass a boolean to it. Also, based on the documentation on MDN, Firefox is the only browser who supports passing a `forceForget` boolean to `reload` function. So, I wonder it should be fine to remove the boolean argument and align the behavior to other browsers. Ref: https://developer.mozilla.org/en-US/docs/Web/API/Location/reload
This commit is contained in:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user