File tree Expand file tree Collapse file tree
static/extensions/DogeisCut Expand file tree Collapse file tree Original file line number Diff line number Diff line change 282282 toJSON ( ) {
283283 return Object . fromEntries (
284284 Object . entries ( this . object ) . map ( ( [ key , value ] ) => {
285- let proto = Object . getPrototypeOf ( value )
286- if ( typeof value === "object" && value !== null && ( proto !== null && proto !== defaultPrototype /* < lazy fix */ ) ) {
287- if ( typeof value . toJSON === "function" ) return [ key , value . toJSON ( ) ]
288- if ( typeof value . toString === "function" ) return [ key , value . toString ( ) ]
289- return [ key , JSON . stringify ( value ) ]
285+ if ( typeof value === "object" && value !== null ) {
286+ let proto = Object . getPrototypeOf ( value )
287+ if ( proto !== null && proto !== defaultPrototype /* < lazy fix */ ) {
288+ if ( typeof value . toJSON === "function" ) return [ key , value . toJSON ( ) ]
289+ if ( typeof value . toString === "function" ) return [ key , value . toString ( ) ]
290+ return [ key , JSON . stringify ( value ) ]
291+ }
290292 }
291293 return [ key , value ]
292294 } )
You can’t perform that action at this time.
0 commit comments