@@ -38,7 +38,7 @@ function getPropertyValue (prop, maxLength) {
3838
3939function getPropertyValueRaw ( prop , maxLength ) {
4040 // Special case for getters and setters which does not have a value property
41- if ( Object . hasOwn ( prop , ' get' ) ) {
41+ if ( prop . get ) {
4242 const hasGet = prop . get . type !== 'undefined'
4343 const hasSet = prop . set . type !== 'undefined'
4444 if ( hasGet ) {
@@ -162,7 +162,7 @@ function toObject (type, props, maxLength, timeBudgetReached) {
162162 fields : processProperties ( props , maxLength )
163163 }
164164
165- if ( Object . hasOwn ( props , fieldCountSym ) ) {
165+ if ( props [ fieldCountSym ] !== undefined ) {
166166 result . notCapturedReason = 'fieldCount'
167167 result . size = props [ fieldCountSym ]
168168 }
@@ -283,11 +283,11 @@ function shouldRedactMapValue (key) {
283283}
284284
285285function getNormalizedNameFromProp ( prop ) {
286- return normalizeName ( prop . name , Object . hasOwn ( prop , ' symbol' ) )
286+ return normalizeName ( prop . name , prop . symbol !== undefined )
287287}
288288
289289function setNotCaptureReasonOnCollection ( result , collection ) {
290- if ( Object . hasOwn ( collection , collectionSizeSym ) ) {
290+ if ( collection [ collectionSizeSym ] !== undefined ) {
291291 result . notCapturedReason = 'collectionSize'
292292 result . size = collection [ collectionSizeSym ]
293293 }
0 commit comments