TypeError: Cannot read properties of null (reading 'signal')

Describe the bug

Since this recent changes, if the third option provided to addEventListener is null, this throw in the vitest patch of addEventListener.

I know typescript isn't happy with null as a thrid parameter, but one of my dependency wich is no longer under maintenance set it as null😅

Reproduction

window.addEventListener('resize', console.log, null)

System Info

System:
    OS: Windows 11 10.0.26100
    CPU: (16) x64 11th Gen Intel(R) Core(TM) i7-11850H @ 2.50GHz
    Memory: 20.08 GB / 63.73 GB
  Binaries:
    Node: 24.11.1 - ~\AppData\Local\pnpm\node.EXE
    Yarn: 1.22.22 - ~\AppData\Local\pnpm\yarn.CMD
    npm: 11.6.2 - ~\AppData\Local\pnpm\npm.CMD
    pnpm: 10.8.1 - ~\AppData\Local\pnpm\pnpm.EXE
    bun: 1.2.19 - ~\AppData\Local\pnpm\bun.CMD
  Browsers:
    Edge: Chromium (140.0.3485.66)
    Internet Explorer: 11.0.26100.188

Used Package Manager

yarn

Validations