Fix `history.pushState/replaceState` first parameter needs to be plain JS bject.