aboutsummaryrefslogtreecommitdiffstats
path: root/src/stores/GlobalErrorStore.ts
diff options
context:
space:
mode:
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]);