remove use of fileProviderOf in compiler UI

pull/5370/head
yann300 3 years ago committed by davidzagi93@gmail.com
parent 1a38fd9160
commit ef4342e13b
  1. 13
      libs/remix-ui/renderer/src/lib/renderer.tsx

@ -86,17 +86,12 @@ export const Renderer = ({ message, opt = {}, plugin }: RendererProps) => {
setClose(true) setClose(true)
} }
const _errorClick = (errFile, errLine, errCol) => { const _errorClick = async (errFile, errLine, errCol) => {
if (errFile !== plugin.getAppParameter('currentFile')) { if (errFile !== plugin.getAppParameter('currentFile')) {
// TODO: refactor with this._components.contextView.jumpTo // TODO: refactor with this._components.contextView.jumpTo
const provider = plugin.fileProviderOf(errFile) if (await plugin.fileExists(errFile)) {
if (provider) { plugin.open(errFile)
provider.exists(errFile).then(() => { plugin.call('editor', 'gotoLine', errLine, errCol)
plugin.open(errFile)
plugin.call('editor', 'gotoLine', errLine, errCol)
}).catch(error => {
if (error) return console.log(error)
})
} }
} else { } else {
plugin.call('editor', 'gotoLine', errLine, errCol) plugin.call('editor', 'gotoLine', errLine, errCol)

Loading…
Cancel
Save