From 6aad38c3d6b3f76c992af4d579a12906256ed3bf Mon Sep 17 00:00:00 2001 From: Mantvydas Deltuva Date: Thu, 29 Aug 2024 01:49:53 +0300 Subject: [PATCH] MDE/PKFE-19 bug-fix --- .../features/editor/components/editorView/editorView.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/front-end/src/features/editor/components/editorView/editorView.tsx b/app/front-end/src/features/editor/components/editorView/editorView.tsx index 5ef03bc..aa2d240 100644 --- a/app/front-end/src/features/editor/components/editorView/editorView.tsx +++ b/app/front-end/src/features/editor/components/editorView/editorView.tsx @@ -54,7 +54,7 @@ export const EditorView: React.FC = () => { setIsLoading(true); try { - const response = await axios.get(`${Endpoints.WORKSPACE}/${Workspace.fileId}`, { + const response = await axios.get(`${Endpoints.WORKSPACE_FILE}/${Workspace.fileId}`, { params: { page: page, rowsPerPage: rowsPerPage, @@ -63,6 +63,12 @@ export const EditorView: React.FC = () => { const { totalRows, header, rows } = response.data as FileDataResponseDTO; + if (!header) { + setgridColumns([]); + setgridRows([]); + return; + } + const parsedColumns = header.map((value) => { return { field: value,