From ef4342e13bb9f4c3d9d50bc04f948ea4ad222d16 Mon Sep 17 00:00:00 2001 From: yann300 Date: Tue, 7 Sep 2021 16:23:09 +0200 Subject: [PATCH] remove use of fileProviderOf in compiler UI --- libs/remix-ui/renderer/src/lib/renderer.tsx | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/libs/remix-ui/renderer/src/lib/renderer.tsx b/libs/remix-ui/renderer/src/lib/renderer.tsx index 8850c1e5b1..f61695abd5 100644 --- a/libs/remix-ui/renderer/src/lib/renderer.tsx +++ b/libs/remix-ui/renderer/src/lib/renderer.tsx @@ -86,17 +86,12 @@ export const Renderer = ({ message, opt = {}, plugin }: RendererProps) => { setClose(true) } - const _errorClick = (errFile, errLine, errCol) => { + const _errorClick = async (errFile, errLine, errCol) => { if (errFile !== plugin.getAppParameter('currentFile')) { // TODO: refactor with this._components.contextView.jumpTo - const provider = plugin.fileProviderOf(errFile) - if (provider) { - provider.exists(errFile).then(() => { - plugin.open(errFile) - plugin.call('editor', 'gotoLine', errLine, errCol) - }).catch(error => { - if (error) return console.log(error) - }) + if (await plugin.fileExists(errFile)) { + plugin.open(errFile) + plugin.call('editor', 'gotoLine', errLine, errCol) } } else { plugin.call('editor', 'gotoLine', errLine, errCol)