mirror of
https://github.com/sasjs/server.git
synced 2025-12-11 19:44:35 +00:00
fix(log): fixed checks for errors and warnings
This commit is contained in:
@@ -115,7 +115,7 @@ const SASjsEditor = ({
|
|||||||
const logWithErrorsOrWarnings =
|
const logWithErrorsOrWarnings =
|
||||||
selectedRunTime === RunTimeType.SAS &&
|
selectedRunTime === RunTimeType.SAS &&
|
||||||
log &&
|
log &&
|
||||||
(log?.errors.length !== 0 || log?.warnings.length !== 0)
|
(log.errors?.length !== 0 || log.warnings?.length !== 0)
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Box sx={{ width: '100%', typography: 'body1', marginTop: '50px' }}>
|
<Box sx={{ width: '100%', typography: 'body1', marginTop: '50px' }}>
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ const LogComponent = (props: LogComponentProps) => {
|
|||||||
defaultCollapseIcon={<ExpandMore />}
|
defaultCollapseIcon={<ExpandMore />}
|
||||||
defaultExpandIcon={<ChevronRight />}
|
defaultExpandIcon={<ChevronRight />}
|
||||||
>
|
>
|
||||||
{log?.errors.length !== 0 && (
|
{log.errors && log.errors.length !== 0 && (
|
||||||
<TreeItem
|
<TreeItem
|
||||||
nodeId="errors"
|
nodeId="errors"
|
||||||
label={
|
label={
|
||||||
@@ -106,7 +106,7 @@ const LogComponent = (props: LogComponentProps) => {
|
|||||||
))}
|
))}
|
||||||
</TreeItem>
|
</TreeItem>
|
||||||
)}
|
)}
|
||||||
{log?.warnings.length !== 0 && (
|
{log.warnings && log.warnings.length !== 0 && (
|
||||||
<TreeItem
|
<TreeItem
|
||||||
nodeId="warnings"
|
nodeId="warnings"
|
||||||
label={
|
label={
|
||||||
|
|||||||
@@ -18,10 +18,10 @@ const LogTabWithIcons = (props: LogTabProps) => {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<span>log</span>
|
<span>log</span>
|
||||||
{errors.length !== 0 && (
|
{errors && errors.length !== 0 && (
|
||||||
<ErrorOutline color="error" style={{ fontSize: 20 }} />
|
<ErrorOutline color="error" style={{ fontSize: 20 }} />
|
||||||
)}
|
)}
|
||||||
{warnings.length !== 0 && (
|
{warnings && warnings.length !== 0 && (
|
||||||
<Warning style={{ fontSize: 20, color: 'green' }} />
|
<Warning style={{ fontSize: 20, color: 'green' }} />
|
||||||
)}{' '}
|
)}{' '}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user