From bf292b4286d91c996b87731d5faecfc91d395fa0 Mon Sep 17 00:00:00 2001 From: piotrpekala7 <31202938+piotrpekala7@users.noreply.github.com> Date: Tue, 9 Jun 2020 13:17:37 +0200 Subject: [PATCH] Update toaster-error-handler.ts --- src/app/common/error-handlers/toaster-error-handler.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/app/common/error-handlers/toaster-error-handler.ts b/src/app/common/error-handlers/toaster-error-handler.ts index fe1eca1b..555cb22c 100644 --- a/src/app/common/error-handlers/toaster-error-handler.ts +++ b/src/app/common/error-handlers/toaster-error-handler.ts @@ -4,7 +4,8 @@ import { ToasterService } from '../../services/toaster.service'; export class ToasterErrorHandler extends RavenErrorHandler { handleError(err: any): void { super.handleError(err); - + if (!err) return; + const toasterService = this.injector.get(ToasterService); if (err.error && err.error.message) { toasterService.error(err.error.message);