aboutsummaryrefslogtreecommitdiffstats
path: root/src/stores/GlobalErrorStore.ts
diff options
context:
space:
mode:
authorLibravatar Ricardo Cino <ricardo@cino.io>2022-07-07 09:31:50 +0200
committerLibravatar GitHub <noreply@github.com>2022-07-07 09:31:50 +0200
commit71c52373f81cace664047edd19d9d289f45a4dff (patch)
tree69b3f1d45a8b3f1ceab9497ea3c96e9dc18e3166 /src/stores/GlobalErrorStore.ts
parent6.0.0-nightly.91 [skip ci] (diff)
downloadferdium-app-71c52373f81cace664047edd19d9d289f45a4dff.tar.gz
ferdium-app-71c52373f81cace664047edd19d9d289f45a4dff.tar.zst
ferdium-app-71c52373f81cace664047edd19d9d289f45a4dff.zip
chore: Mobx & React-Router upgrade (#406)
Co-authored-by: Vijay A <vraravam@users.noreply.github.com>
Diffstat (limited to 'src/stores/GlobalErrorStore.ts')
-rw-r--r--src/stores/GlobalErrorStore.ts4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/stores/GlobalErrorStore.ts b/src/stores/GlobalErrorStore.ts
index 8c6317c91..c42e9a4af 100644
--- a/src/stores/GlobalErrorStore.ts
+++ b/src/stores/GlobalErrorStore.ts
@@ -1,4 +1,4 @@
1import { observable, action } from 'mobx'; 1import { observable, action, makeObservable } from 'mobx';
2import { Actions } from '../actions/lib/actions'; 2import { Actions } from '../actions/lib/actions';
3import { ApiInterface } from '../api'; 3import { ApiInterface } from '../api';
4import { Stores } from '../@types/stores.types'; 4import { Stores } from '../@types/stores.types';
@@ -34,6 +34,8 @@ export default class GlobalErrorStore extends TypedStore {
34 constructor(stores: Stores, api: ApiInterface, actions: Actions) { 34 constructor(stores: Stores, api: ApiInterface, actions: Actions) {
35 super(stores, api, actions); 35 super(stores, api, actions);
36 36
37 makeObservable(this);
38
37 window.addEventListener('error', (...errorArgs: any[]): void => { 39 window.addEventListener('error', (...errorArgs: any[]): void => {
38 // @ts-ignore ts-message: Expected 5 arguments, but got 2. 40 // @ts-ignore ts-message: Expected 5 arguments, but got 2.
39 this._handleConsoleError.call(this, ['error', ...errorArgs]); 41 this._handleConsoleError.call(this, ['error', ...errorArgs]);