mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-12-27 00:17:32 +01:00
Change job shortcut test to match sidebar item
I switched it to match the same condition as the sidebar menu item, which checks for player.companyName, which should be set to the latest company the player worked at. This can prevent a crash loading the jobs page with an invalid companyName. This fixes a problem a user had where the player.companyName was empty while actually items in player.jobs, but I could not figure out how to replicate. It may have had something to do with part-time jobs.
This commit is contained in:
parent
8b69fd7faa
commit
82fe86820f
@ -297,7 +297,7 @@ export function SidebarRoot(props: IProps): React.ReactElement {
|
||||
} else if (event.keyCode === KEY.W && event.altKey) {
|
||||
event.preventDefault();
|
||||
clickCity();
|
||||
} else if (event.keyCode === KEY.J && event.altKey && !event.ctrlKey && !event.metaKey && props.player.hasJob()) {
|
||||
} else if (event.keyCode === KEY.J && event.altKey && !event.ctrlKey && !event.metaKey && canJob) {
|
||||
// ctrl/cmd + alt + j is shortcut to open Chrome dev tools
|
||||
event.preventDefault();
|
||||
clickJob();
|
||||
|
Loading…
Reference in New Issue
Block a user