From 41db0dc2e36e86f0399a5dd4c541f7cdc488da22 Mon Sep 17 00:00:00 2001 From: aniket-engg Date: Mon, 12 Oct 2020 13:55:13 +0530 Subject: [PATCH] syntax highlighting fixed --- apps/remix-ide/src/app/tabs/debugger/debuggerUI/VmDebugger.js | 2 +- apps/remix-ide/src/lib/offsetToLineColumnConverter.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/remix-ide/src/app/tabs/debugger/debuggerUI/VmDebugger.js b/apps/remix-ide/src/app/tabs/debugger/debuggerUI/VmDebugger.js index 3cd34cdba9..4088021ba6 100644 --- a/apps/remix-ide/src/app/tabs/debugger/debuggerUI/VmDebugger.js +++ b/apps/remix-ide/src/app/tabs/debugger/debuggerUI/VmDebugger.js @@ -38,7 +38,7 @@ function VmDebugger (vmDebuggerLogic) { this.functionPanel = new FunctionPanel() this.vmDebuggerLogic.event.register('functionsStackUpdate', (stack) => { - if (stack === null) return + if (stack === null || stack.length === 0) return let functions = [] for (let func of stack) { functions.push(func.functionDefinition.name + '(' + func.inputs.join(', ') + ')') diff --git a/apps/remix-ide/src/lib/offsetToLineColumnConverter.js b/apps/remix-ide/src/lib/offsetToLineColumnConverter.js index f252174df6..4bc4a8e883 100644 --- a/apps/remix-ide/src/lib/offsetToLineColumnConverter.js +++ b/apps/remix-ide/src/lib/offsetToLineColumnConverter.js @@ -20,8 +20,8 @@ export class OffsetToLineColumnConverter extends Plugin { offsetToLineColumn (rawLocation, file, sources, asts) { if (!this.lineBreakPositionsByContent[file]) { const sourcesArray = Object.keys(sources) - if (!asts && file === 0 && sourcesArray.length === 1) { - // if we don't have ast, we process the only one available content + if (!asts || (file === 0 && sourcesArray.length === 1)) { + // if we don't have ast, we process the only one available content (applicable also for compiler older than 0.4.12) this.lineBreakPositionsByContent[file] = this.sourceMappingDecoder.getLinebreakPositions(sources[sourcesArray[0]].content) } else { for (var filename in asts) {