1
0
mirror of https://github.com/sasjs/server.git synced 2026-01-13 09:00:04 +00:00

fix(log): fixed switching runtime

This commit is contained in:
Yury Shkoda
2023-04-11 16:10:52 +03:00
parent 02e2b060f9
commit c7a73991a7
3 changed files with 21 additions and 14 deletions

View File

@@ -24,6 +24,7 @@ import { usePrompt } from '../../utils/hooks'
import { getLanguageFromExtension } from './internal/helper'
import useEditor from './internal/hooks/useEditor'
import { RunTimeType } from '../../context/appContext'
import { LogObject } from '../../utils'
const StyledTabPanel = styled(TabPanel)(() => ({
padding: '10px'
@@ -115,7 +116,8 @@ const SASjsEditor = ({
const logWithErrorsOrWarnings =
selectedRunTime === RunTimeType.SAS &&
log &&
(log.errors?.length !== 0 || log.warnings?.length !== 0)
((log as LogObject).errors?.length !== 0 ||
(log as LogObject).warnings?.length !== 0)
return (
<Box sx={{ width: '100%', typography: 'body1', marginTop: '50px' }}>
@@ -158,7 +160,11 @@ const SASjsEditor = ({
label={logWithErrorsOrWarnings ? '' : 'log'}
value="log"
icon={
logWithErrorsOrWarnings ? <LogTabWithIcons log={log} /> : ''
logWithErrorsOrWarnings ? (
<LogTabWithIcons log={log as LogObject} />
) : (
''
)
}
onClick={() => {
const logWrapper = document.querySelector(`#logWrapper`)