File tree 1 file changed +7
-7
lines changed
1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -188,13 +188,7 @@ function getOwnPropertyDescriptors(object) {
188
188
const result = { } ;
189
189
190
190
Object . getOwnPropertyNames ( object ) . forEach ( function ( key ) {
191
- result [ key ] = Object . getOwnPropertyDescriptor ( object , key ) ;
192
- // Assume these are schema paths, ignore them re: #5470
193
- if ( result [ key ] . get ) {
194
- delete result [ key ] ;
195
- return ;
196
- }
197
- result [ key ] . enumerable = [
191
+ const skip = [
198
192
'isNew' ,
199
193
'$__' ,
200
194
'errors' ,
@@ -205,6 +199,12 @@ function getOwnPropertyDescriptors(object) {
205
199
'__index' ,
206
200
'$isDocumentArrayElement'
207
201
] . indexOf ( key ) === - 1 ;
202
+ if ( skip ) {
203
+ return ;
204
+ }
205
+
206
+ result [ key ] = Object . getOwnPropertyDescriptor ( object , key ) ;
207
+ result [ key ] . enumerable = false ;
208
208
} ) ;
209
209
210
210
return result ;
You can’t perform that action at this time.
0 commit comments