diff --git a/x-pack/packages/ml/nested_property/src/set_nested_property.test.ts b/x-pack/packages/ml/nested_property/src/set_nested_property.test.ts index 180454d55c457..eb28202d7672d 100644 --- a/x-pack/packages/ml/nested_property/src/set_nested_property.test.ts +++ b/x-pack/packages/ml/nested_property/src/set_nested_property.test.ts @@ -75,6 +75,6 @@ describe('object_utils', () => { const test13 = setNestedProperty(getTestObj(), 'the.prototype', 'update'); expect(test13.the).toBe('update'); - expect(test13.the.prototype.update).toBe(undefined); + expect(test13.the.prototype?.update).toBe(undefined); }); });