From 71c52373f81cace664047edd19d9d289f45a4dff Mon Sep 17 00:00:00 2001 From: Ricardo Cino Date: Thu, 7 Jul 2022 09:31:50 +0200 Subject: chore: Mobx & React-Router upgrade (#406) Co-authored-by: Vijay A --- src/stores/GlobalErrorStore.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/stores/GlobalErrorStore.ts') 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 @@ -import { observable, action } from 'mobx'; +import { observable, action, makeObservable } from 'mobx'; import { Actions } from '../actions/lib/actions'; import { ApiInterface } from '../api'; import { Stores } from '../@types/stores.types'; @@ -34,6 +34,8 @@ export default class GlobalErrorStore extends TypedStore { constructor(stores: Stores, api: ApiInterface, actions: Actions) { super(stores, api, actions); + makeObservable(this); + window.addEventListener('error', (...errorArgs: any[]): void => { // @ts-ignore ts-message: Expected 5 arguments, but got 2. this._handleConsoleError.call(this, ['error', ...errorArgs]); -- cgit v1.2.3-54-g00ecf