mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-12-24 07:02:26 +01:00
Moved window.print redefining at top level to prevent naming collision
This commit is contained in:
parent
2be1d5ff15
commit
75de6c665d
@ -4,6 +4,7 @@ import ReactDOM from "react-dom";
|
||||
import { TTheme as Theme, ThemeEvents, refreshTheme } from "./Themes/ui/Theme";
|
||||
import { LoadingScreen } from "./ui/LoadingScreen";
|
||||
import { initElectron } from "./Electron";
|
||||
import { AlertEvents } from "./ui/React/AlertManager";
|
||||
initElectron();
|
||||
globalThis["React"] = React;
|
||||
globalThis["ReactDOM"] = ReactDOM;
|
||||
@ -34,3 +35,9 @@ function rerender(): void {
|
||||
return "Your work will be lost.";
|
||||
};
|
||||
})();
|
||||
|
||||
(function () {
|
||||
window.print = () => {
|
||||
throw new Error("You accidentally called window.print instead of ns.print");
|
||||
};
|
||||
})();
|
||||
|
Loading…
Reference in New Issue
Block a user