fix: broken render due to regression in store
This commit is contained in:
@@ -5,7 +5,7 @@
|
|||||||
:id="'query'"
|
:id="'query'"
|
||||||
:label="`${t('tab.query')}`"
|
:label="`${t('tab.query')}`"
|
||||||
:selected="true"
|
:selected="true"
|
||||||
:indicator="gqlQueryString.length > 0"
|
:indicator="gqlQueryString && gqlQueryString.length > 0 ? true : false"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
class="bg-primary border-b border-dividerLight flex flex-1 top-upperSecondaryStickyFold pl-4 z-10 sticky items-center justify-between gqlRunQuery"
|
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
|
<SmartTab
|
||||||
:id="'variables'"
|
:id="'variables'"
|
||||||
:label="`${t('tab.variables')}`"
|
:label="`${t('tab.variables')}`"
|
||||||
:indicator="variableString.length > 0"
|
:indicator="variableString && variableString.length > 0 ? true : false"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
class="bg-primary border-b border-dividerLight flex flex-1 top-upperSecondaryStickyFold pl-4 z-10 sticky items-center justify-between"
|
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(
|
results = results.concat(
|
||||||
semanticLints.map((lint: any) => ({
|
semanticLints.map((lint: any) => ({
|
||||||
from: lint.from,
|
from: {
|
||||||
to: lint.to,
|
ch: lint.from.ch + 1,
|
||||||
|
line: lint.from.line + 1,
|
||||||
|
},
|
||||||
|
to: {
|
||||||
|
ch: lint.from.ch + 1,
|
||||||
|
line: lint.to.line + 1,
|
||||||
|
},
|
||||||
severity: "error",
|
severity: "error",
|
||||||
message: `[semantic] ${lint.message}`,
|
message: `[semantic] ${lint.message}`,
|
||||||
}))
|
}))
|
||||||
@@ -24,12 +30,12 @@ const linter: LinterDefinition = async (text) => {
|
|||||||
results = results.concat(
|
results = results.concat(
|
||||||
res.errors.map((err: any) => {
|
res.errors.map((err: any) => {
|
||||||
const fromPos: { line: number; ch: number } = {
|
const fromPos: { line: number; ch: number } = {
|
||||||
line: err.lineNumber - 1,
|
line: err.lineNumber,
|
||||||
ch: err.column - 1,
|
ch: err.column,
|
||||||
}
|
}
|
||||||
|
|
||||||
const toPos: { line: number; ch: number } = {
|
const toPos: { line: number; ch: number } = {
|
||||||
line: err.lineNumber - 1,
|
line: err.lineNumber,
|
||||||
ch: err.column,
|
ch: err.column,
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -42,14 +48,14 @@ const linter: LinterDefinition = async (text) => {
|
|||||||
})
|
})
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e: any) {
|
||||||
const fromPos: { line: number; ch: number } = {
|
const fromPos: { line: number; ch: number } = {
|
||||||
line: e.lineNumber - 1,
|
line: e.lineNumber,
|
||||||
ch: e.column - 1,
|
ch: e.column,
|
||||||
}
|
}
|
||||||
|
|
||||||
const toPos: { line: number; ch: number } = {
|
const toPos: { line: number; ch: number } = {
|
||||||
line: e.lineNumber - 1,
|
line: e.lineNumber,
|
||||||
ch: e.column,
|
ch: e.column,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -10,8 +10,14 @@ const linter: LinterDefinition = async (text) => {
|
|||||||
|
|
||||||
results = results.concat(
|
results = results.concat(
|
||||||
semanticLints.map((lint: any) => ({
|
semanticLints.map((lint: any) => ({
|
||||||
from: lint.from,
|
from: {
|
||||||
to: lint.to,
|
ch: lint.from.ch + 1,
|
||||||
|
line: lint.from.line + 1,
|
||||||
|
},
|
||||||
|
to: {
|
||||||
|
ch: lint.from.ch + 1,
|
||||||
|
line: lint.to.line + 1,
|
||||||
|
},
|
||||||
severity: "error",
|
severity: "error",
|
||||||
message: `[semantic] ${lint.message}`,
|
message: `[semantic] ${lint.message}`,
|
||||||
}))
|
}))
|
||||||
@@ -24,12 +30,12 @@ const linter: LinterDefinition = async (text) => {
|
|||||||
results = results.concat(
|
results = results.concat(
|
||||||
res.errors.map((err: any) => {
|
res.errors.map((err: any) => {
|
||||||
const fromPos: { line: number; ch: number } = {
|
const fromPos: { line: number; ch: number } = {
|
||||||
line: err.lineNumber - 1,
|
line: err.lineNumber,
|
||||||
ch: err.column - 1,
|
ch: err.column,
|
||||||
}
|
}
|
||||||
|
|
||||||
const toPos: { line: number; ch: number } = {
|
const toPos: { line: number; ch: number } = {
|
||||||
line: err.lineNumber - 1,
|
line: err.lineNumber,
|
||||||
ch: err.column,
|
ch: err.column,
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -42,14 +48,14 @@ const linter: LinterDefinition = async (text) => {
|
|||||||
})
|
})
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e: any) {
|
||||||
const fromPos: { line: number; ch: number } = {
|
const fromPos: { line: number; ch: number } = {
|
||||||
line: e.lineNumber - 1,
|
line: e.lineNumber,
|
||||||
ch: e.column - 1,
|
ch: e.column,
|
||||||
}
|
}
|
||||||
|
|
||||||
const toPos: { line: number; ch: number } = {
|
const toPos: { line: number; ch: number } = {
|
||||||
line: e.lineNumber - 1,
|
line: e.lineNumber,
|
||||||
ch: e.column,
|
ch: e.column,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -46,7 +46,9 @@
|
|||||||
<SmartTab
|
<SmartTab
|
||||||
:id="'preRequestScript'"
|
:id="'preRequestScript'"
|
||||||
:label="`${$t('tab.pre_request_script')}`"
|
:label="`${$t('tab.pre_request_script')}`"
|
||||||
:indicator="preRequestScript.length > 0"
|
:indicator="
|
||||||
|
preRequestScript && preRequestScript.length > 0 ? true : false
|
||||||
|
"
|
||||||
>
|
>
|
||||||
<HttpPreRequestScript />
|
<HttpPreRequestScript />
|
||||||
</SmartTab>
|
</SmartTab>
|
||||||
@@ -54,7 +56,7 @@
|
|||||||
<SmartTab
|
<SmartTab
|
||||||
:id="'tests'"
|
:id="'tests'"
|
||||||
:label="`${$t('tab.tests')}`"
|
:label="`${$t('tab.tests')}`"
|
||||||
:indicator="testScript.length > 0"
|
:indicator="testScript && testScript.length > 0 ? true : false"
|
||||||
>
|
>
|
||||||
<HttpTests />
|
<HttpTests />
|
||||||
</SmartTab>
|
</SmartTab>
|
||||||
|
|||||||
Reference in New Issue
Block a user