From ff0e98cb45f2464e148f4de34f933d53acae5f33 Mon Sep 17 00:00:00 2001 From: lianahus Date: Mon, 4 Oct 2021 11:51:25 +0200 Subject: [PATCH] tsc errors fix --- apps/remix-ide/src/app/tabs/compile-tab.js | 2 +- libs/remix-tests/src/run.ts | 2 +- libs/remixd/src/bin/remixd.ts | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/apps/remix-ide/src/app/tabs/compile-tab.js b/apps/remix-ide/src/app/tabs/compile-tab.js index f419542f89..fd51638170 100644 --- a/apps/remix-ide/src/app/tabs/compile-tab.js +++ b/apps/remix-ide/src/app/tabs/compile-tab.js @@ -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 = '' } } diff --git a/libs/remix-tests/src/run.ts b/libs/remix-tests/src/run.ts index 062016312b..e70bde21db 100644 --- a/libs/remix-tests/src/run.ts +++ b/libs/remix-tests/src/run.ts @@ -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() diff --git a/libs/remixd/src/bin/remixd.ts b/libs/remixd/src/bin/remixd.ts index 1e0e241f5f..b57c31f6b6 100644 --- a/libs/remixd/src/bin/remixd.ts +++ b/libs/remixd/src/bin/remixd.ts @@ -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