Skip to content

Commit

Permalink
fix: ignore SplitPane children error
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelwenk committed Aug 29, 2022
1 parent 0d12007 commit 9e34c9a
Showing 1 changed file with 28 additions and 3 deletions.
31 changes: 28 additions & 3 deletions src/component/panels/Panels.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,7 @@ function Panels() {
() => (
<div className="panels">
<HighlightProvider>
{/* @ts-ignore */}
<SplitPane
split="vertical"
defaultSize="60%"
Expand Down Expand Up @@ -383,9 +384,33 @@ function Panels() {
<div className="request-error">
<p>Request failed:</p>
<p>
{requestError.response?.data.errorMessage
? requestError.response?.data.errorMessage
: 'Could not connect to Sherlock`s backend services'}
{axios.isAxiosError(requestError) ? (
(
requestError.response?.data as {
errorMessage: string;
}
).errorMessage ? (
(
requestError.response?.data as {
errorMessage: string;
}
).errorMessage
) : (
<p>
<label>
Could not connect to Sherlock`s backend services:
</label>
<br />
<label>
{JSON.stringify(
requestError.response?.data as {},
)}
</label>
</p>
)
) : (
'Could not connect to Sherlock`s backend services'
)}
</p>
</div>
) : requestWasCancelled ? (
Expand Down

0 comments on commit 9e34c9a

Please sign in to comment.