From 6d90c80106a95a3a0057bcf5101b814ba579b513 Mon Sep 17 00:00:00 2001 From: Jan Monschke Date: Tue, 12 Mar 2024 20:31:11 +0100 Subject: [PATCH] fix some type errors --- .../public/timelines/components/open_timeline/helpers.test.ts | 4 ++-- .../server/lib/timeline/saved_object/notes/saved_object.ts | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/x-pack/plugins/security_solution/public/timelines/components/open_timeline/helpers.test.ts b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/helpers.test.ts index d77d89cf17e53..9c9f0a9a5bcc7 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/open_timeline/helpers.test.ts +++ b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/helpers.test.ts @@ -853,7 +853,7 @@ describe('helpers', () => { updated: 1585233356356, noteId: 'note-id', note: 'I am a note', - timelineId: null, + timelineId: 'testId', version: 'testVersion', }, ], @@ -871,7 +871,7 @@ describe('helpers', () => { note: 'I am a note', user: 'unknown', saveObjectId: 'note-id', - timelineId: null, + timelineId: 'testId', version: 'testVersion', }, ], diff --git a/x-pack/plugins/security_solution/server/lib/timeline/saved_object/notes/saved_object.ts b/x-pack/plugins/security_solution/server/lib/timeline/saved_object/notes/saved_object.ts index 437a27f95c106..1f087efcf8d2d 100644 --- a/x-pack/plugins/security_solution/server/lib/timeline/saved_object/notes/saved_object.ts +++ b/x-pack/plugins/security_solution/server/lib/timeline/saved_object/notes/saved_object.ts @@ -113,7 +113,6 @@ const createNote = async ({ const userInfo = request.user; const shallowCopyOfNote = { ...note }; - let timelineVersion: string | undefined; if (note.timelineId == null) { const { timeline: timelineResult } = await createTimeline({ @@ -124,7 +123,6 @@ const createNote = async ({ }); shallowCopyOfNote.timelineId = timelineResult.savedObjectId; - timelineVersion = timelineResult.version; } const noteWithCreator = overrideOwner