diff --git a/packages/nimble-components/src/number-field/tests/number-field.foundation.spec.ts b/packages/nimble-components/src/number-field/tests/number-field.foundation.spec.ts index c113d19afb..d8fc51ec3d 100644 --- a/packages/nimble-components/src/number-field/tests/number-field.foundation.spec.ts +++ b/packages/nimble-components/src/number-field/tests/number-field.foundation.spec.ts @@ -20,10 +20,11 @@ async function setup(props?: Partial): Promise<{ const { element, connect, disconnect, parent } = await fixture(FASTNumberField()); if (props) { - // eslint-disable-next-line guard-for-in for (const key in props) { - // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call, @typescript-eslint/no-explicit-any - (element as any)[key] = (props as any)[key].toString(); + if (Object.prototype.hasOwnProperty.call(props, key)) { + // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call, @typescript-eslint/no-explicit-any + (element as any)[key] = (props as any)[key].toString(); + } } }