Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
riccardoperra committed Oct 31, 2024
1 parent f39f3a1 commit a3a6f66
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
7 changes: 5 additions & 2 deletions packages/app/src/components/Editor/StatusBar/StatusBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {Button, IconButton, Tooltip} from '@codeui/kit';
import {Icon} from '#ui/components/Icon';
import {EditorStore} from '~/store/editor/editor.store';
import {EditorUiStore} from '~/store/editor/ui.store';
import {createEffect} from 'solid-js';

export function EditorStatusBar() {
const canvasState = provideState(CanvasStore);
Expand All @@ -21,8 +22,10 @@ export function EditorStatusBar() {
const size = () => Math.floor(canvasState.get.scale * 100);

const errors = () =>
editorStore.get.diagnostics.filter(diagnostic => diagnostic.severity === 1)
.length;
editorStore.get.diagnostics.filter(
diagnostic =>
diagnostic.severity === 1 || diagnostic.severity === undefined,
).length;

const warnings = () =>
editorStore.get.diagnostics.filter(diagnostic => diagnostic.severity === 2)
Expand Down
4 changes: 2 additions & 2 deletions packages/app/src/components/Editor/YamlEditor/YamlEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {
createCodeMirror,
createLazyCompartmentExtension,
} from 'solid-codemirror';
import {createEffect, onMount} from 'solid-js';
import {createEffect} from 'solid-js';
import {fleetDark} from './fleetTheme';

const githubLanguageServerTransport = () =>
Expand Down Expand Up @@ -72,7 +72,7 @@ export function YamlEditor(props: YamlEditorProps) {
languageId: 'yaml',
}),
EditorView.updateListener.from(diagnosticState, value => {
props.onDiagnosticsChange?.(value);
props.onDiagnosticsChange?.([...value]);
return () => {};
}),
];
Expand Down

0 comments on commit a3a6f66

Please sign in to comment.