fix: broken render due to regression in store
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
:id="'query'"
|
||||
:label="`${t('tab.query')}`"
|
||||
:selected="true"
|
||||
:indicator="gqlQueryString.length > 0"
|
||||
:indicator="gqlQueryString && gqlQueryString.length > 0 ? true : false"
|
||||
>
|
||||
<div
|
||||
class="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"
|
||||
>
|
||||
<div
|
||||
class="bg-primary border-b border-dividerLight flex flex-1 top-upperSecondaryStickyFold pl-4 z-10 sticky items-center justify-between"
|
||||
|
||||
@@ -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,
|
||||
}
|
||||
|
||||
|
||||
@@ -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,
|
||||
}
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user