fix: fixed bug with warning rendering in the sidebar

ref: N25B-450
This commit is contained in:
JGerla
2026-01-22 18:19:36 +01:00
parent a00fd02634
commit 274ffb0238
2 changed files with 6 additions and 6 deletions

View File

@@ -246,7 +246,7 @@ function VisProgPage() {
// however this would cause unneeded updates
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [severityIndex]);
console.log(programValidity);
console.log(severityIndex);
return (
<>
<VisualProgrammingUI/>

View File

@@ -71,7 +71,7 @@ function WarningsList(props: { warnings: EditorWarning[] }) {
global: props.warnings.filter(w => w.scope.id === globalWarning),
other: props.warnings.filter(w => w.scope.id !== globalWarning),
}
console.log(splitWarnings);
if (props.warnings.length === 0) {
return (
<div className={styles.warningsEmpty}>
@@ -85,9 +85,9 @@ function WarningsList(props: { warnings: EditorWarning[] }) {
<div className={styles.warningGroupHeader}>global:</div>
<div className={styles.warningsList}>
{splitWarnings.global.map((warning) => (
<WarningListItem warning={warning} key={`${warning.scope.id}|${warning.type}` + warning.scope.handleId
<WarningListItem warning={warning} key={`${warning.scope.id}|${warning.type}` + (warning.scope.handleId
? `:${warning.scope.handleId}`
: ""}
: "")}
/>
))}
{splitWarnings.global.length === 0 && "No global warnings!"}
@@ -97,9 +97,9 @@ function WarningsList(props: { warnings: EditorWarning[] }) {
<div className={styles.warningGroupHeader}>other:</div>
<div className={styles.warningsList}>
{splitWarnings.other.map((warning) => (
<WarningListItem warning={warning} key={`${warning.scope.id}|${warning.type}` + warning.scope.handleId
<WarningListItem warning={warning} key={`${warning.scope.id}|${warning.type}` + (warning.scope.handleId
? `:${warning.scope.handleId}`
: ""}
: "")}
/>
))}
{splitWarnings.other.length === 0 && "No other warnings!"}