diff --git a/apps/remix-ide/src/app/plugins/parser/code-parser.tsx b/apps/remix-ide/src/app/plugins/parser/code-parser.tsx index c95cb9efca..50e1deb0f1 100644 --- a/apps/remix-ide/src/app/plugins/parser/code-parser.tsx +++ b/apps/remix-ide/src/app/plugins/parser/code-parser.tsx @@ -193,11 +193,19 @@ export class CodeParser extends Plugin { }) this.on('config', 'configChanged', async (config) => { - await this.reload() + if (config.key === 'settings/auto-completion' || + config.key === 'settings/display-errors' || + config.key === 'settings/show-gas') { + await this.reload() + } }) this.on('settings', 'configChanged', async (config) => { - await this.reload() + if (config.key === 'settings/auto-completion' || + config.key === 'settings/display-errors' || + config.key === 'settings/show-gas') { + await this.reload() + } }) await this.compilerService.init() diff --git a/libs/remix-ui/run-tab/src/lib/components/contractDropdownUI.tsx b/libs/remix-ui/run-tab/src/lib/components/contractDropdownUI.tsx index 5a59befec9..5a672c318f 100644 --- a/libs/remix-ui/run-tab/src/lib/components/contractDropdownUI.tsx +++ b/libs/remix-ui/run-tab/src/lib/components/contractDropdownUI.tsx @@ -370,7 +370,9 @@ export function ContractDropdownUI(props: ContractDropdownProps) { let evmVersion = null try { - evmVersion = JSON.parse(loadedContractData.metadata).settings.evmVersion + if (loadedContractData && loadedContractData.metadata) { + evmVersion = JSON.parse(loadedContractData.metadata).settings.evmVersion + } } catch (err) {} return (