From 93d24e69ecf20e2931258a023dc5ce0a49ef44ff Mon Sep 17 00:00:00 2001 From: Partouf Date: Sat, 30 Oct 2021 23:53:10 +0200 Subject: [PATCH] bugfix --- static/line-colouring.ts | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/static/line-colouring.ts b/static/line-colouring.ts index ecda68ed8..047624644 100644 --- a/static/line-colouring.ts +++ b/static/line-colouring.ts @@ -112,10 +112,18 @@ export class LineColouring { } public getColoursForCompiler(compilerId: number): Object { - return this.linesAndColourByCompiler[compilerId]; + if (this.linesAndColourByCompiler[compilerId]) { + return this.linesAndColourByCompiler[compilerId]; + } else { + return {}; + } } public getColoursForEditor(editorId: number): Object { - return this.linesAndColourByEditor[editorId]; + if (this.linesAndColourByEditor[editorId]) { + return this.linesAndColourByEditor[editorId]; + } else { + return {}; + } } };