Open-Source API Development Ecosystem • https://hoppscotch.io • Offline, On-Prem & Cloud • Web, Desktop & CLI • Open-Source Alternative to Postman, Insomnia
TypeScript apiapi-clientapi-restapi-testingdeveloper-toolsgraphqlhttphttp-clientpwarestrest-apispatestingtesting-toolstoolsvuevuejswebsocket
fix: broken render due to regression in store
liyasthomas8ca059cf4a80
diff --git a/packages/hoppscotch-app/components/graphql/RequestOptions.vue b/packages/hoppscotch-app/components/graphql/RequestOptions.vueindex 226461553..fb5cc8044 100644--- a/packages/hoppscotch-app/components/graphql/RequestOptions.vue+++ b/packages/hoppscotch-app/components/graphql/RequestOptions.vue@@ -5,7 +5,7 @@:id="'query'":label="`${t('tab.query')}`":selected="true"- :indicator="gqlQueryString.length > 0"+ :indicator="gqlQueryString && gqlQueryString.length > 0 ? true : false"><divclass="bg-primary border-b border-dividerLight flex flex-1 top-upperSecondaryStickyFold pl-4 z-10 sticky items-center justify-between gqlRunQuery"@@ -60,7 +60,7 @@<SmartTab:id="'variables'":label="`${t('tab.variables')}`"- :indicator="variableString.length > 0"+ :indicator="variableString && variableString.length > 0 ? true : false"><divclass="bg-primary border-b border-dividerLight flex flex-1 top-upperSecondaryStickyFold pl-4 z-10 sticky items-center justify-between"diff --git a/packages/hoppscotch-app/helpers/editor/linting/preRequest.ts b/packages/hoppscotch-app/helpers/editor/linting/preRequest.tsindex db42d9864..39af68611 100644--- a/packages/hoppscotch-app/helpers/editor/linting/preRequest.ts+++ b/packages/hoppscotch-app/helpers/editor/linting/preRequest.ts@@ -10,8 +10,14 @@ const linter: LinterDefinition = async (text) => {results = results.concat(semanticLints.map((lint: any) => ({- from: lint.from,- to: lint.to,+ from: {+ ch: lint.from.ch + 1,+ line: lint.from.line + 1,+ },+ to: {+ ch: lint.from.ch + 1,+ line: lint.to.line + 1,+ },severity: "error",message: `[semantic] ${lint.message}`,}))@@ -24,12 +30,12 @@ const linter: LinterDefinition = async (text) => {results = results.concat(res.errors.map((err: any) => {const fromPos: { line: number; ch: number } = {- line: err.lineNumber - 1,- ch: err.column - 1,+ line: err.lineNumber,+ ch: err.column,}const toPos: { line: number; ch: number } = {- line: err.lineNumber - 1,+ line: err.lineNumber,ch: err.column,}@@ -42,14 +48,14 @@ const linter: LinterDefinition = async (text) => {}))}- } catch (e) {+ } catch (e: any) {const fromPos: { line: number; ch: number } = {- line: e.lineNumber - 1,- ch: e.column - 1,+ line: e.lineNumber,+ ch: e.column,}const toPos: { line: number; ch: number } = {- line: e.lineNumber - 1,+ line: e.lineNumber,ch: e.column,}diff --git a/packages/hoppscotch-app/helpers/editor/linting/testScript.ts b/packages/hoppscotch-app/helpers/editor/linting/testScript.tsindex 902d1778c..75d193f82 100644--- a/packages/hoppscotch-app/helpers/editor/linting/testScript.ts+++ b/packages/hoppscotch-app/helpers/editor/linting/testScript.ts@@ -10,8 +10,14 @@ const linter: LinterDefinition = async (text) => {results = results.concat(semanticLints.map((lint: any) => ({- from: lint.from,- to: lint.to,+ from: {+ ch: lint.from.ch + 1,+ line: lint.from.line + 1,+ },+ to: {+ ch: lint.from.ch + 1,+ line: lint.to.line + 1,+ },severity: "error",message: `[semantic] ${lint.message}`,}))@@ -24,12 +30,12 @@ const linter: LinterDefinition = async (text) => {results = results.concat(res.errors.map((err: any) => {const fromPos: { line: number; ch: number } = {- line: err.lineNumber - 1,- ch: err.column - 1,+ line: err.lineNumber,+ ch: err.column,}const toPos: { line: number; ch: number } = {- line: err.lineNumber - 1,+ line: err.lineNumber,ch: err.column,}@@ -42,14 +48,14 @@ const linter: LinterDefinition = async (text) => {}))}- } catch (e) {+ } catch (e: any) {const fromPos: { line: number; ch: number } = {- line: e.lineNumber - 1,- ch: e.column - 1,+ line: e.lineNumber,+ ch: e.column,}const toPos: { line: number; ch: number } = {- line: e.lineNumber - 1,+ line: e.lineNumber,ch: e.column,}diff --git a/packages/hoppscotch-app/pages/index.vue b/packages/hoppscotch-app/pages/index.vueindex e2eb9148a..4888692c1 100644--- a/packages/hoppscotch-app/pages/index.vue+++ b/packages/hoppscotch-app/pages/index.vue@@ -46,7 +46,9 @@<SmartTab:id="'preRequestScript'":label="`${$t('tab.pre_request_script')}`"- :indicator="preRequestScript.length > 0"+ :indicator="+ preRequestScript && preRequestScript.length > 0 ? true : false+ "><HttpPreRequestScript /></SmartTab>@@ -54,7 +56,7 @@<SmartTab:id="'tests'":label="`${$t('tab.tests')}`"- :indicator="testScript.length > 0"+ :indicator="testScript && testScript.length > 0 ? true : false"><HttpTests /></SmartTab>