remove use of fileProviderOf in compiler UI

pull/1342/head
yann300 3 years ago committed by davidzagi93@gmail.com
parent 02a743a07f
commit 9f558402d6
  1. 13
      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)

Loading…
Cancel
Save