Skip to content

Window object from options is not passed to createBrowserURLImpl in the new version, breaking URL creation #15044

@nextgennexia

Description

@nextgennexia

Reproduction

Hello!

In the new version, getUrlBaseHistory correctly receives window via options, but when it calls createBrowserURLImpl (instead of the internal createURL used in v7.5.3), the window object is lost — createBrowserURLImpl uses the wrong window (likely the global one) instead of the one passed from options.

This breaks functionality that depends on the correct window context.

Steps to Reproduce

Call getUrlBaseHistory(options) where options contains a specific window object.

Inside getUrlBaseHistory, observe that options.window is correct.

The function then calls createBrowserURLImpl(…) (external) instead of the internal createURL.

Inside createBrowserURLImpl, the window used is not the one from options.

Version

Working: v7.5.3

Broken: [new version, e.g., v7.6.0]

Additional Context
In v7.5.3, getUrlBaseHistory used an internal helper createURL that correctly inherited the window from the closure/options.
In the new version, createURL is replaced with an external createBrowserURLImpl which does not propagate the window parameter.

System Info

System:
    OS: Windows 11 10.0.26100
    CPU: (20) x64 13th Gen Intel(R) Core(TM) i7-13700H
    Memory: 2.50 GB / 15.53 GB
  Binaries:
    Node: 22.19.0 - C:\Program Files\nodejs\node.EXE
    Yarn: 4.14.1 - ~\AppData\Roaming\npm\yarn.CMD
    npm: 11.12.1 - C:\Program Files\nodejs\npm.CMD
    pnpm: 8.15.5 - ~\AppData\Roaming\npm\pnpm.CMD
  Browsers:
    Edge: Chromium (147.0.3912.72)
    Internet Explorer: 11.0.26100.8115

Used Package Manager

npm

Expected Behavior

createBrowserURLImpl should receive and use the same window object that was passed via options to getUrlBaseHistory, matching the behavior of the internal createURL in v7.5.3.

Actual Behavior

createBrowserURLImpl uses a different (probably global) window, ignoring the one provided in options.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions