mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-03-13 05:27:17 +08:00
Fix going back returning a blank screen
This commit is contained in:
parent
5f9d5dd33f
commit
10adc756d7
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user