Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#18978 closed defect (fixed)

request/util/deepCopy does not handle Date objects correctly

Reported by: Michael Schall Owned by: dylans <[email protected]…>
Priority: high Milestone: 1.13
Component: Core Version: 1.12.1
Keywords: Cc:
Blocked By: Blocking:


When calling util.deepCopy properties of type Date do not get copied.


Change History (3)

comment:1 Changed 5 years ago by Michael Schall

Here is a patch. I will try and create PR soon.

  • request/util.js

    1414                                sval = source[name];
    1515                        if(tval !== sval){
    1616                                if(tval && typeof tval === 'object' && sval && typeof sval === 'object'){
    17                                         exports.deepCopy(tval, sval);
     17                                        if(sval instanceof Date){
     18                                                target[name] = new Date(sval);
     19                                        }else{
     20                                                exports.deepCopy(tval, sval);
     21                                        }
    1822                                }else{
    1923                                        target[name] = sval;
    2024                                }

comment:2 Changed 5 years ago by dylans <[email protected]…>

Owner: set to dylans <[email protected]…>
Resolution: fixed
Status: newclosed

In 2aa295a/dojo:

Error: Processor CommitTicketReference failed
Unsupported version control system "git": Can't find an appropriate component, maybe the corresponding plugin was not enabled? 

comment:3 Changed 5 years ago by dylan

Component: GeneralCore
Milestone: tbd1.13
Priority: undecidedhigh
Note: See TracTickets for help on using tickets.