mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-12-17 17:34:39 +01:00
Fix going back returning a blank screen
This commit is contained in:
@@ -57,6 +57,10 @@ export function removeNavListener(listener: (page: Page) => void) {
|
||||
* @param update Whether to update the state or not.
|
||||
*/
|
||||
export function navigate(page: Page, update: boolean = true): Page | null {
|
||||
// Check the page.
|
||||
if (page == undefined)
|
||||
page = "Home";
|
||||
|
||||
// Navigate to the new page.
|
||||
const lastPage = currentPage;
|
||||
navigation.emit("navigate", page);
|
||||
|
||||
Reference in New Issue
Block a user