mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-10 01:33:54 +01:00
commit
7633f271db
@ -121,6 +121,16 @@ export function Root(props: IProps): React.ReactElement {
|
||||
vim: props.vim || Settings.MonacoVim,
|
||||
});
|
||||
|
||||
// Prevent Crash if script is open on deleted server
|
||||
openScripts = openScripts.filter((script) => {
|
||||
return GetServer(script.hostname) !== null;
|
||||
})
|
||||
if (currentScript && (GetServer(currentScript.hostname) === null)) {
|
||||
currentScript = openScripts[0];
|
||||
if (currentScript === undefined) currentScript = null;
|
||||
}
|
||||
|
||||
|
||||
const [dimensions, setDimensions] = useState({
|
||||
height: window.innerHeight,
|
||||
width: window.innerWidth,
|
||||
|
Loading…
Reference in New Issue
Block a user