From b2a474178d9db80146cfcb2d9bdcb7380a19525e Mon Sep 17 00:00:00 2001 From: sanke1 <22073083+sankerust@users.noreply.github.com> Date: Tue, 17 Jul 2018 15:50:03 +0300 Subject: [PATCH] Choosing custom color for analytic unit #31 (#41) * add type to value in used methids rename Anomaly => AnalyticUnit fix wrong method being called * add an exception to AnalyticUnitColorChange --- src/controllers/analytic_controller.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/controllers/analytic_controller.ts b/src/controllers/analytic_controller.ts index e8400a4..6fca88d 100644 --- a/src/controllers/analytic_controller.ts +++ b/src/controllers/analytic_controller.ts @@ -171,6 +171,9 @@ export class AnalyticController { } onAnalyticUnitColorChange(id: AnalyticUnitId, value: string) { + if(id === undefined) { + throw new Error('id is undefined'); + } this._analyticUnitsSet.byId(id).color = value; }