diff --git a/src/treaty2/index.ts b/src/treaty2/index.ts index ddb0768..b89875b 100644 --- a/src/treaty2/index.ts +++ b/src/treaty2/index.ts @@ -196,6 +196,11 @@ const createProxy = ( continue } + if(value instanceof Date && !isNaN(value.getTime())) { + append(key, value.toISOString()) + continue + } + if (typeof value === 'object') { append(key, JSON.stringify(value)) continue