Skip to content

Latest commit

 

History

History
41 lines (33 loc) · 620 Bytes

readme.md

File metadata and controls

41 lines (33 loc) · 620 Bytes

Drizzle D1 Bug

Reproduction

  • Install dependencies with npm install
  • Run node index.js and observe the output

There seems to be an off by one error somewhere.

Expected output

{
  "user": {
    "id": "user-id-1",
    "name": "Alice"
  },
  "session": {
    "id": "session-id-1",
    "userId": "user-id-1",
    "expiresAt": 123456
  }
}

Actual output

{
  "user": {
    "id": "session-id-1",
    "name": "Alice"
  },
  "session": {
    "id": "user-id-1",
    "userId": 123456
  }
}

session.expiresAt is set but it's undefined (which gets stripped by JSON.stringify).