Reproduction example
null
Prerequisites
Setting a value to null programmatically.
|
return typeof value === 'object' && UIValue in value |
Expected behavior
Nothing happens
Actual behavior
TypeError: right hand side of 'in' should be an object, got null
Since EcmaScript returns object on typeof null this function is not safe
|
return typeof value === 'object' && UIValue in value |
User-event version
14.6.1
Environment
No response
Additional context
No response
Reproduction example
null
Prerequisites
Setting a value to
nullprogrammatically.user-event/src/document/UI.ts
Line 24 in 63ac399
Expected behavior
Nothing happens
Actual behavior
TypeError: right hand side of 'in' should be an object, got nullSince EcmaScript returns
objectontypeof nullthis function is not safeuser-event/src/document/UI.ts
Line 24 in 63ac399
User-event version
14.6.1
Environment
No response
Additional context
No response