File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
x-pack/plugins/security_solution/public/common/components/exceptions/builder Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -325,16 +325,19 @@ export const getEntryOnFieldChange = (
325325 newField : IFieldType
326326) : { updatedEntry : BuilderEntry ; index : number } => {
327327 const { parent, entryIndex, nested } = item ;
328- const newParentFieldValue =
329- newField . subType != null && newField . subType . nested != null ? newField . subType . nested . path : '' ;
330- const newChildFieldValue = newField . name . split ( '.' ) . slice ( - 1 ) [ 0 ] ;
328+ const newChildFieldValue = newField != null ? newField . name . split ( '.' ) . slice ( - 1 ) [ 0 ] : '' ;
331329
332330 if ( nested === 'parent' ) {
333331 // For nested entries, when user first selects to add a nested
334332 // entry, they first see a row similiar to what is shown for when
335333 // a user selects "exists", as soon as they make a selection
336334 // we can now identify the 'parent' and 'child' this is where
337335 // we first convert the entry into type "nested"
336+ const newParentFieldValue =
337+ newField . subType != null && newField . subType . nested != null
338+ ? newField . subType . nested . path
339+ : '' ;
340+
338341 return {
339342 updatedEntry : {
340343 field : newParentFieldValue ,
You can’t perform that action at this time.
0 commit comments