File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed
packages/svelte/src/reactivity Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ " svelte " : patch
3
+ ---
4
+
5
+ fix: ensure arguments are supported on all reactive Date methods
Original file line number Diff line number Diff line change @@ -68,16 +68,16 @@ export class ReactiveDate extends Date {
68
68
69
69
for ( const method of read ) {
70
70
// @ts -ignore
71
- proto [ method ] = function ( ) {
71
+ proto [ method ] = function ( ... args ) {
72
72
get ( this . #raw_time) ;
73
73
// @ts -ignore
74
- return date_proto [ method ] . call ( this ) ;
74
+ return date_proto [ method ] . apply ( this , args ) ;
75
75
} ;
76
76
}
77
77
78
78
for ( const method of write ) {
79
79
// @ts -ignore
80
- proto [ method ] = function ( /** @type { any } */ ...args ) {
80
+ proto [ method ] = function ( ...args ) {
81
81
// @ts -ignore
82
82
const v = date_proto [ method ] . apply ( this , args ) ;
83
83
const time = date_proto . getTime . call ( this ) ;
You can’t perform that action at this time.
0 commit comments