mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-27 11:27:04 +02:00
Attempt to fix bladeburner.process() issue
For a certain user, it appears that the engine attempts to route to the bitverse screen before the router is properly initialized. I could not reproduce the problem on my side and we were not able to extract his save game, so this is a blind shot if it'll work or not.
This commit is contained in:
@@ -111,6 +111,7 @@ const useStyles = makeStyles((theme: Theme) =>
|
||||
);
|
||||
|
||||
export let Router: IRouter = {
|
||||
isInitialized: false,
|
||||
page: () => {
|
||||
throw new Error("Router called before initialization");
|
||||
},
|
||||
@@ -266,6 +267,7 @@ export function GameRoot({ player, engine, terminal }: IProps): React.ReactEleme
|
||||
}
|
||||
|
||||
Router = {
|
||||
isInitialized: true,
|
||||
page: () => page,
|
||||
allowRouting: (value: boolean) => setAllowRoutingCalls(value),
|
||||
toActiveScripts: () => setPage(Page.ActiveScripts),
|
||||
|
||||
Reference in New Issue
Block a user