fix setTheme

This commit is contained in:
Snarling 2023-02-13 19:49:07 -05:00 committed by GitHub
parent f916007f2d
commit f16a4f1a4e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -28,7 +28,6 @@ export function NetscriptUserInterface(): InternalAPI<IUserInterface> {
const hex = /^(#)((?:[A-Fa-f0-9]{2}){3,4}|(?:[A-Fa-f0-9]{3}))$/; const hex = /^(#)((?:[A-Fa-f0-9]{2}){3,4}|(?:[A-Fa-f0-9]{3}))$/;
const currentTheme = { ...Settings.theme }; const currentTheme = { ...Settings.theme };
const errors: string[] = []; const errors: string[] = [];
if (typeof newTheme !== "object")
for (const key of Object.keys(newTheme)) { for (const key of Object.keys(newTheme)) {
if (!currentTheme[key]) { if (!currentTheme[key]) {
// Invalid key // Invalid key