remix-run / history

Manage session history with JavaScript
MIT License
8.29k stars 961 forks source link

globalHistory.pushState function excuted failed in baidu.app #952

Open zhaohongyan opened 2 years ago

zhaohongyan commented 2 years ago

https://github.com/remix-run/history/blob/dev/packages/history/index.ts line497 I encountered a compatibility problem. When using Baidu app, the page could not be jumped. After debugging, it was found that the globalHistory.pushState method was not executed or failed to execute. Other browsers do not have this problem.

<BrowserRouter>
    <Routes>
        <Route path="/" element={<Home />} />
        <Route path="/about" element={<About />} />
        <Route path="/page" element={<Page />} />
    </Routes>
</BrowserRouter>