chore(desktop): simplify code (#1146)

This commit is contained in:
Himself65
2023-02-20 23:15:40 -06:00
committed by GitHub
parent ed4d1e8bcd
commit edd8f347bc
13 changed files with 30 additions and 191 deletions

View File

@@ -43,11 +43,18 @@ const printBuildInfo = () => {
};
function setWindowEditorVersion() {
// when it is not SSR
if (typeof window !== 'undefined') {
window.__editoVersion = publicRuntimeConfig.EDITOR_VERSION;
}
globalThis.__editoVersion = publicRuntimeConfig.EDITOR_VERSION;
}
printBuildInfo();
setWindowEditorVersion();
declare global {
// eslint-disable-next-line no-var
var __affineSetupEnv: boolean | undefined;
}
if (!globalThis.__affineSetupEnv) {
printBuildInfo();
setWindowEditorVersion();
globalThis.__affineSetupEnv = true;
}
export {};