File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
static/extensions/DogeisCut Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change 545545 entries => {
546546 // this is here because for some reason i decided to do it like that in the old format
547547 if ( entries . entries && Array . isArray ( entries . entries ) ) { // this shouldn't trigger a false positive for a jwArray
548- entries = entries . entries . map ( ( { key, value} ) => [ key , value ] )
548+ entries = entries . entries . map ( ( entry ) => {
549+ const key = entry . key
550+ if ( entry . customType == true ) {
551+ const value = { ...entry }
552+ delete value . key
553+ return [ key , value ]
554+ }
555+ return [ key , entry . value ]
556+ } )
549557 }
558+ // this is for converting from the new format
550559 return new dogeiscutObject . Type ( new Map ( entries . map ( ( [ key , value ] ) => {
551560 if ( typeof value == "object" && value != null && value . customType ) {
552561 return [ String ( key ) , vm . runtime . serializers [ value . typeId ] . deserialize ( value . serialized ) ]
You can’t perform that action at this time.
0 commit comments