Commit af22cb09 authored by lianahus's avatar lianahus

tsc errors fix

parent 77b0ccd8
......@@ -127,7 +127,7 @@ class CompileTab extends CompilerApiMixin(ViewPlugin) { // implements ICompilerA
try {
this.currentFile = await this.call('fileManager', 'file')
} catch (e) {
throw new Error(e)
this.currentFile = ''
}
}
......
......@@ -82,7 +82,7 @@ commander
const baseURL = 'https://binaries.soliditylang.org/wasm/'
const response: AxiosResponse = await axios.get(baseURL + 'list.json')
const { releases, latestRelease } = response.data
const compString = releases[compVersion]
const compString = releases ? releases[compVersion] : null
if (!compString) {
log.error(`No compiler found in releases with version ${compVersion}`)
process.exit()
......
......@@ -156,7 +156,8 @@ function errorHandler (error: any, service: string) {
console.error(e)
}
return data.includes(origin) ? data.includes(origin) : data.includes(domain)
const dataArray:string[] = data
return dataArray.includes(origin) ? dataArray.includes(origin) : dataArray.includes(domain)
} catch (e) {
try {
// eslint-disable-next-line
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment