diff --git a/src/components/JSONViewer/NotebookParamsCell.tsx b/src/components/JSONViewer/NotebookParamsCell.tsx index 0c62ad3f..042953b1 100644 --- a/src/components/JSONViewer/NotebookParamsCell.tsx +++ b/src/components/JSONViewer/NotebookParamsCell.tsx @@ -197,7 +197,7 @@ const NotebookParamsCell = ({ const paramsWithType = Object.fromEntries( paramsValue .filter(filterParameters) - .map(({ name, type, value }) => [name, convertParameterValue(value, type)]), + .map(({ name, type: paramType, value }) => [name, convertParameterValue(value, paramType)]), ); const res = await api.jsonViewer.launchNotebook(notebook.name, paramsWithType); if (res.task_id !== '') { diff --git a/src/stores/JSONViewer/JSONViewerStore.ts b/src/stores/JSONViewer/JSONViewerStore.ts index 05e61ed9..300efb03 100644 --- a/src/stores/JSONViewer/JSONViewerStore.ts +++ b/src/stores/JSONViewer/JSONViewerStore.ts @@ -394,9 +394,9 @@ export class JSONViewerStore { const nextId = this.treeNodes[type].find( node => node.displayTimestamp && node.displayTimestamp >= timestamp, ); - const prevId = this.treeNodes[type].findLast( - node => node.displayTimestamp && node.displayTimestamp <= timestamp, - ); + const prevId = this.treeNodes[type] + .reverse() + .find(node => node.displayTimestamp && node.displayTimestamp <= timestamp); return { prevId: prevId ? prevId.id : '', nextId: nextId ? nextId.id : '',