diff --git a/package.json b/package.json index af337ff..aae0e06 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rs-bundler", - "version": "0.13.0", + "version": "0.13.1", "description": "RageStudio Bundler Utility GUI", "main": "./out/main/index.js", "author": "RageStudio", diff --git a/src/renderer/src/router.jsx b/src/renderer/src/router.jsx index ae5e2eb..ea8e38a 100644 --- a/src/renderer/src/router.jsx +++ b/src/renderer/src/router.jsx @@ -64,9 +64,15 @@ const NavigationController = (props) => { } } - app.location.path = to + app.location.last = { + path: app.location.path, + search: app.location.search, + state: app.location.state, + } - app.location.last = window.location + app.location.search = to.includes("?") ? to.split("?")[1] : "" + app.location.state = state + app.location.path = to document.startViewTransition(() => { navigate(to, { @@ -76,7 +82,7 @@ const NavigationController = (props) => { } async function backLocation() { - return setLocation(app.location.last.pathname + app.location.last.search, app.location.last.state) + return setLocation(app.location.last.path + app.location.last.search, app.location.last.state) } function pushToListeners(listener) { @@ -91,7 +97,11 @@ const NavigationController = (props) => { React.useEffect(() => { app.location = { - last: window.location, + last: { + path: "/", + search: "", + state: {}, + }, path: "/", listeners: [], listen: pushToListeners,